我可以将柏树托管到服务器吗?

发布于 2025-02-06 07:59:35 字数 363 浏览 3 评论 0原文

因此,我们使用柏树 +黄瓜来执行E2E UI测试。一切都很好,每当我触发脚本时,它都会显示柏树弹出窗口,然后我手动触发一些任务。现在,我们希望我们的QA人员使用相同的提示来测试一些特定方案。我知道触发测试的一种方法是在CI/CD管道期间,但是我想知道是否有办法在某些服务器上托管该应用程序,而质量检查人员可以随时触发特定的流程。

到目前为止,我找到了Cypress Run-Browser Chrome--头 - NO-EXIT -EXIT-PORT 9000命令,以保持服务器处于活动状态并在单击它时运行测试。但是,当我将URL复制并在另一个浏览器中打开时,我会看到一个错误,说它无法运行测试,因为浏览器未通过柏树打开。

请让我知道是否有办法实现它。

So we're using Cypress + Cucumber to perform E2E UI tests. Everything is running fine, whenever I trigger the script, it shows the cypress pop-up, and I trigger a few tasks manually. Now we want our QA person to use the same prompt to test a few specific scenarios as they will. I know one way to trigger the test is during the CI/CD pipeline, but I was wondering if there's a way to host the app on some server, and a QA person can trigger a particular flow whenever they want.

So far I found cypress run --browser chrome --headed --no-exit --port 9000 command to keep the server active and run the tests when you click on it. But when I copy the URL and open it in another browser, I see an error saying that it can't run the test because the browser was not opened by cypress.

Please let me know if there's a way to achieve it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

多像笑话 2025-02-13 07:59:37

我不确定我要准确地关注您想要的内容,但是如果您只想运行某些测试,则可以通过在功能文件中添加标签并通过命令运行它们来使用标签。
运行命令

运行一个标签:

 Npx cypress run -e TAGS=‘@tagName’

要运行多个标签,请列出由“或”分隔的,例如:

Npx cypress run -e TAGS=‘@tagName or @otherTagName’

运行测试运行,不包括某个标签

Npx cypress run -e TAGS='not @tagName'

I'm not sure I'm following exactly what you want, but if you want to run only certain tests you can use tags by adding them on your feature files and running them through the command.
Run Command

To Run a single tag:

 Npx cypress run -e TAGS=‘@tagName’

To run multiple tags, list them separated by 'or', eg:

Npx cypress run -e TAGS=‘@tagName or @otherTagName’

To run a test run excluding a certain tag

Npx cypress run -e TAGS='not @tagName'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文