3

我一直在尝试将我的赛普拉斯测试上传到他们匹配的 TestRail 测试用例,但到目前为止它还没有工作。


这是我当前的设置:

我已经安装了:

  • cypress-testrail-reporter

在我的cypress.json文件中,我有:

{
    "baseUrl": "my website URL",
    "projectId": "my project ID",
    "reporter": "cypress-testrail-reporter",
    "reporterOptions": {
        "domain": "https://customName.testrail.io",
        "username": "myemail@address.com",
        "password": "My API key",
        "projectId": 2,
        "suiteId": 12
    }
}

在赛普拉斯,我有一个名为it()的块名为it.only("C170 Using wrong credentials", ...)

在 TestRail 我有以下设置:

  • API 已启用
  • 我有一个自定义 API 密钥(在 config.json 中使用)
  • 我是管理员用户
  • 有一个编号为 C170 的测试用例

然后,当我运行时cypress run --record --key my-record-key-from-cypress

  • 测试出现在赛普拉斯仪表板中
  • 测试不会出现在 TestRail 仪表板中

知道可能缺少什么吗?

4

2 回答 2

4

解决了

不要在cypress.json文件中的reportOptions中包含http(s)://

BAD:   "domain": "https://customName.testrail.io"
GOOD:  "domain": "customName.testrail.io"

平心而论,它被称为domain,而不是URL,所以我删除 https 是有道理的

于 2020-02-10T15:30:25.153 回答
2

您还应该从 CLI 而不是赛普拉斯测试运行程序运行测试。

于 2020-08-07T10:14:37.233 回答