简体   繁体   English

多次运行同一个Selenium测试套件

[英]Run the same Selenium test suite multiple times

I am using webdriver to automate some actions on webpage and have created a selenium test suite test.xml 我正在使用webdriver自动执行网页上的某些操作,并创建了一个硒测试套件test.xml

<suite name="testSuite" verbose="1" parallel="tests" thread-count="5">
    ...all the tests in this suite...
</suite>

for the purpose of testing, I want to run this suite multiple times or run it constantly for 1-2 hours (a single run takes only 2-3 minutes). 为了进行测试,我想多次运行此套件或将其连续运行1-2小时(一次运行仅需2-3分钟)。

Is there a simple way to make the suite run again and again? 有没有简单的方法可以使套件一次又一次地运行?

Thanks! 谢谢!

There is a simple and standard way for 有一种简单而标准的方法

to run this suite multiple times or run it constantly for 1-2 hours 多次运行此套件或连续运行1-2小时

it's called CI servers. 它被称为CI服务器。 Most popular are: 最受欢迎的是:

Since you've put Java tag - the first two will do the job just fine. 既然已经放置了Java标记-前两个标记就可以完成工作。 They all include reporting on the number of tests that pass and fail, and can help link test failures to source code changes in order to more quickly identify issues. 它们都包括报告通过和失败的测试数量,并可以帮助将测试失败与源代码更改链接起来,以便更快地确定问题。

By running tests on a regular, repeatable basis, you can start tracking other metrics as well – for example, is your test coverage improving over time? 通过定期,可重复地运行测试,您还可以开始跟踪其他指标-例如,随着时间的推移,您的测试覆盖率是否有所提高? One team at Red Gate actually fails builds if new code causes the test coverage to drop compared to the previous build – a great example of using monitoring to encourage the development behaviour your team is aiming for! 如果新代码导致测试覆盖率与之前的版本相比下降,则Red Gate的一个团队实际上会使构建失败。这是使用监控来鼓励团队追求的开发行为的一个很好的例子!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM