倾城报告不显示类别[codeceptjs]

问题描述 投票:0回答:1

我试图使用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.*"]
    }
  ]

并在诱惑报告中,只获得产品缺陷。

This is how it looks

我正在使用诱惑:2.8.1 codeceptjs:1.4.6 appium:1.8.2

report allure codeceptjs
1个回答
0
投票

你有错误的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.*"
}]
© www.soinside.com 2019 - 2024. All rights reserved.