我试图使用categories.json文件按各种类别中的失败测试结果进行分类。我正在使用以下JSON文件:
[
{
"name": "Ignored tests",
"matchedStatuses": ["skipped"]
},
{
"name": "Infrastructure problems",
"matchedStatuses": ["broken", "failed"],
"messageRegex": ".*An unknown server-side error occurred.*"
},
{
"name": "Outdated tests",
"matchedStatuses": ["broken"],
"traceRegex": ".*FileNotFoundException.*"
},
{
"name": "Test defects",
"matchedStatuses":[
"broken",
"Element is not currently visible and may not be manipulated"
],
"traceRegex":[
".*Cannot read property.*",
".*is not in DOM or there is no element.*",
".*is not a function.*"
]
},
{
"name": "Element Not visible",
"traceRegex":[
".*still not visible after.*",
".*Element is not currently visible and may not be manipulated.*",
".*was not found by text|CSS|XPath.*"
]
},
{
"name":"Promise Rejected",
"traceRegex": [".*Promise was rejected with the following reason.*"]
}
]
并在诱惑报告中,只获得产品缺陷。
我正在使用诱惑:2.8.1 codeceptjs:1.4.6 appium:1.8.2
你有错误的categories.json
文件格式(traceRegex
预计是一个字符串)。如果您希望每个类别都有多个匹配器,只需使用相同的名称:
[{
"name": "Element Not visible",
"traceRegex": ".*still not visible after.*"
}, {
"name": "Element Not visible",
"traceRegex": ".*Element is not currently visible and may not be manipulated.*"
}]