【问题标题】:Integrating Cypress within TestRail在 TestRail 中集成 Cypress
【发布时间】:2020-02-10 14:45:25
【问题描述】:

我一直在尝试将我的 Cypress 测试上传到其匹配的 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.only("C170 Using wrong credentials", ...)

it()

在 TestRail 我有以下设置:

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

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

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

知道可能缺少什么吗?

【问题讨论】:

    标签: javascript cypress qa testrail


    【解决方案1】:

    已解决

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

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

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

    【讨论】:

      【解决方案2】:

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

      【讨论】:

        猜你喜欢
        • 2022-10-14
        • 2017-11-06
        • 2021-12-05
        • 1970-01-01
        • 2019-01-08
        • 2019-07-15
        • 1970-01-01
        • 2022-09-27
        • 2017-09-03
        相关资源
        最近更新 更多