Mochawesome报告程序在使用Mocha的this.retries()api时输出不正确的json结果

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

尽管我看到有关此的open issue,想检查我们是否有解决方法,任何建议表示赞赏? :

[仅在使用this.retries()时,我看到json结果显示元素nullstatespeed元素passfailfalseerr为空,也为html报告看起来不正确的结果。这是我的测试

describe(`Page Load checks `, async function ()  {

it('Page Check', async function () {
        this.retries(1); 
        presentationsPage = await navMenu.loadPresentationsPage();
        const result = await presentationsPage.isPresentationsPageLoadComplete();
        expect(result).to.equal(true, 'Expected : Presentation Page');
    }) ;
 } );

和json结果

{
              "title": "Page Check",
              "fullTitle": "Page Loads  Check",
              "timedOut": false,
              "duration": 32014,
              "state": null,
              "speed": null,
              "pass": false,
              "fail": false,
              "pending": false,
              "context": null,
              "code": "__awaiter(this, void 0, void 0, function...",
              "err": {},
              "uuid": "6971b4af-b327bda4ffa8",
              "parentUUID": "3345841e-6a5f-19fee98",
              "isHook": false,
              "skipped": true
            }
typescript mocha mochawesome
1个回答
0
投票

[如果任何人在使用retries()时遇到同一问题,我将切换到名为[mocha-allure-reporter][1]的报告框架。我发现这是一个很好的报告框架。

© www.soinside.com 2019 - 2024. All rights reserved.