gpt4 book ai didi

javascript - 在 TestRail 中集成 Cypress

转载 作者:行者123 更新时间:2023-12-04 16:41:24 25 4
gpt4 key购买 nike

我一直在尝试将我的 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
}
}

在 Cypress 中,我有一个 it() block ,名为 it.only("C170 Using wrong credentials", ...)

在 TestRail 中,我有以下设置:

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

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

  • 测试出现在 Cypress Dashboard 中
  • 测试不要出现在TestRail仪表盘中

知道可能遗漏了什么吗?

最佳答案

已解决

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

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

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

关于javascript - 在 TestRail 中集成 Cypress,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60152766/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com