Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
4cd6ee04
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
4cd6ee04
编写于
12月 04, 2020
作者:
V
Vitaliy Zakaznikov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Updating TestFlows README.md to include "How To Debug Why Test Failed" section.
上级
60b0cbb1
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
88 addition
and
0 deletion
+88
-0
tests/testflows/README.md
tests/testflows/README.md
+88
-0
未找到文件。
tests/testflows/README.md
浏览文件 @
4cd6ee04
...
...
@@ -72,6 +72,94 @@ If you want to run only a single test such as the `/clickhouse/rbac/syntax/grant
For more information, please see
[
Filtering
](
https://testflows.com/handbook/#Filtering
)
section in the [TestFlows Handbook].
## How To Debug Why Test Failed
### Step 1: find which tests failed
If [TestFlows] check does not pass you should look at the end of the
`test_run.txt.out.log`
to find the list
of failing tests. For example,
```
bash
clickhouse_testflows_tests_volume
Start tests
➤ Dec 02,2020 22:22:24 /clickhouse
...
Failing
✘
[
Fail
]
/clickhouse/rbac/syntax/grant privilege/grant privileges/privilege
=
'SELECT'
,
on
=(
'db0.table0'
,
'db0.*'
,
'*.*'
,
'tb0'
,
'*'
)
,
allow_column
=
True,
allow_introspection
=
False
✘
[
Fail
]
/clickhouse/rbac/syntax/grant privilege/grant privileges
✘
[
Fail
]
/clickhouse/rbac/syntax/grant privilege
✘
[
Fail
]
/clickhouse/rbac/syntax
✘
[
Fail
]
/clickhouse/rbac
✘
[
Fail
]
/clickhouse
```
In this case the failing test is
```
/clickhouse/rbac/syntax/grant privilege/grant privileges/privilege='SELECT', on=('db0.table0', 'db0.*', '*.*', 'tb0', '*'), allow_column=True, allow_introspection=False
```
while the others
```
✘ [ Fail ] /clickhouse/rbac/syntax/grant privilege/grant privileges
✘ [ Fail ] /clickhouse/rbac/syntax/grant privilege
✘ [ Fail ] /clickhouse/rbac/syntax
✘ [ Fail ] /clickhouse/rbac
✘ [ Fail ] /clickhouse
```
failed because the first fail gets "bubble-up" the test execution tree all the way to the top level test which is the
`/clickhouse`
.
### Step 2: download `test.log` that contains all raw messages
You need to download the
`test.log`
that contains all raw messages.
### Step 3: get messages for the failing test
Once you know the name of the failing test and you have the
`test.log`
that contains all the raw messages
for all the tests, you can use
`tfs show test messages`
command.
> You get the `tfs` command by installing [TestFlows].
For example,
```
bash
cat
test.log | tfs show
test
messages
"/clickhouse/rbac/syntax/grant privilege/grant privileges/privilege='SELECT', on=
\(
'db0.table0', 'db0.
\*
', '
\*
.
\*
', 'tb0', '
\*
'
\)
, allow_column=True, allow_introspection=False"
```
> Note: that characters that are treated as special by the shell need to be escaped. In this case
> we have to escape the `*`, `(`, and the `)` characters in the test name.
### Step 4: working with the `test.log`
You can use the
`test.log`
with many of the commands provided by the
`tfs`
utility.
> See `tfs --help` for more information.
For example, you can get a list of failing tests from the
`test.log`
using the
`tfs show fails`
command as follows
```
bash
$
cat
test.log | tfs show fails
```
or get the results using the
`tfs show results`
command as follows
```
bash
$
cat
test.log | tfs show results
```
or you can transform the log to see only the new fails using the
`tfs transform fail --new`
command as follows
```
bash
$
cat
test.log | tfs transform fails
--new
```
[
Python 3
]:
https://www.python.org/
[
Ubuntu
]:
https://ubuntu.com/
[
TestFlows
]:
https://testflows.com
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录