【问题标题】:Mochawesome Report Visualize. (CodeceptJS and Puppeteer was used) I was able to create a report, but unable to view it properlyMochawesome 报告可视化。 (使用 CodeceptJS 和 Puppeteer)我能够创建报告,但无法正确查看
【发布时间】:2020-05-18 11:57:21
【问题描述】:

报告包含这些数据。但无法可视化

这些是生成的报告和 JSON 数据。

【问题讨论】:

    标签: puppeteer codeceptjs mochawesome


    【解决方案1】:

    您可以使用 HTML 报告而不是 JSON 输出,在您的 codecept.conf.js 中添加以下配置:

    为助手添加 Mochawesome 助手:

      helpers: {
         Mochawesome: {
            "uniqueScreenshotNames": "true",
            "disableScreenshots" : "false"
         }
    }
    

    并将 {"reportDir": "output"} 添加到 mocha 配置中,如下所示:

      mocha: {
         "reporterOptions": {
             "codeceptjs-cli-reporter": {
                 "stdout": "-",
                 "options": {
                    "verbose": true,
                    "steps": true,
                   }
              },
             "mocha-junit-reporter": {
                  "stdout": "./output/console.log",
                  "options": {
                     "mochaFile": "./output/result.xml"
                  }
             },
            "reportDir": "output",
            "inlineAssets": true,
            "reporter": "mochawesome"
          }
        }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-04-18
      • 2011-02-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-09-23
      • 1970-01-01
      相关资源
      最近更新 更多