0

我正在尝试将 cypress resporting 与报告门户和 mochawaesome 集成。目标是获得这两个报告。我已经在

柏树.json

"reporter": "cypress-multi-reporters",
    "reporterOptions": {
        "reporterEnabled": "mochawesome, @reportportal/agent-js-cypress",
        "mochawesomeReporterOptions": {
            "reportDir": "cypress/reports/mocha",
            "quite": true,
            "overwrite": false,
            "html": false,
            "json": true
        },
        "reportPortalReporterOptions": {
            "endpoint": "abc",
            "token": "123",
            "launch": "launcher",
            "project": "project-name",
            "autoMerge": true,
            "description": "QA"
        }

    }

它不起作用。是否有另一种方法可以在 cypress 中将 2 个报告工具集成在一起

4

1 回答 1

0

目前在我们的项目中,我们在下面使用

配置文件

{
"reporterEnabled": "mocha-junit-reporter",
"mochaJunitReporterReporterOptions": {
    "mochaFile": "/results/junit-custom-[hash].xml"
},
"reportportalAgentJsCypressReporterOptions": {
    "endpoint": "http://<remote_IP>:8080/api/v1",
    "token": "c6a4015e-61fa-4506-b1de-cfc24e93b2ba",
    "launch": "apps_dr",
    "project": "my_test_app",
    "description": "Sample",
    "autoMerge": false,
    "isLaunchMergeRequired": true,
    "attributes": [
        {
            "key": "domain",
            "value": "Apps"
        },
        {
            "key": "name",
            "value": "my test app"
        },
        {
            "key": "type",
            "value": "UI"
        }
    ]
    }
}

柏树.json

添加以下参数:

 "reporter": "@reportportal/agent-js-cypress",

而且,它对我们来说效果很好。

于 2022-02-14T11:21:40.147 回答