[英]How does sauce lab will transfer the test results report from sauce lab to jenkins dashboard?
I am trying to use sauce labs with jenkins for the selenium functional test cases.我正在尝试将酱实验室与 jenkins 一起用于 selenium 功能测试用例。
let's say I have a jenkins ci/cd pipeline in network-1 where it connects to git repo to checkout the code and do the deployment in network-2.假设我在 network-1 中有一个 jenkins ci/cd 管道,它连接到 git repo 以检查代码并在 network-2 中进行部署。
now after the deployment, selenium functional test cases has to run so jenkins is making connection to sauce labs现在在部署之后,selenium 功能测试用例必须运行,所以 jenkins 正在连接到酱实验室
Once the tests are done executing on sauce labs and response is generated.一旦测试完成,在酱汁实验室执行并生成响应。
how does sauce lab will transfer the test results report from sauce lab to jenkins dashboard?酱实验室如何将测试结果报告从酱实验室传输到 jenkins 仪表板?
This is a two part answer.这是一个两部分的答案。
The first part is, how does Sauce Labs know a test is successful?第一部分是,Sauce Labs 如何知道测试是否成功? When you're using Appium or Selenium, the answer is that it doesn't .
当您使用 Appium 或 Selenium 时,答案是它没有。 Selenium/Appium are only tools for driving a browser;
Selenium/Appium 只是驱动浏览器的工具; Your test code has the final authority on whether a test passes or not.
您的测试代码对测试是否通过拥有最终决定权。
To update the results on a Sauce Labs test, your test runner can use one of the methods listed here: https://docs.saucelabs.com/test-results/test-status/ .要更新 Sauce Labs 测试的结果,您的测试运行者可以使用此处列出的方法之一: https://docs.saucelabs.com/test-results/test-status/ 。
The second part is displaying results in Jenkins.第二部分是在 Jenkins 中显示结果。 Since your test runner remains the authority here, you should focus on getting Jenkins to display the results from the test runner.
由于您的测试运行程序在这里仍然是权威,您应该专注于让 Jenkins 显示来自测试运行程序的结果。 One thing you can do because of Sauce Labs is embed video results into the Jenkins test reports, using the Sauce Labs Jenkins Plugin .
由于 Sauce Labs,您可以做的一件事是使用Sauce Labs Jenkins 插件将视频结果嵌入 Jenkins 测试报告中。 This does, however, rely on your tests generating a JUnit format XML result file.
但是,这确实依赖于您的测试生成 JUnit 格式 XML 结果文件。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.