繁体   English   中英

如何在等待一个测试用例执行完成时在TestNG测试套件中执行其他测试用例

[英]How to execute other test cases in a TestNG test suite while waiting for one test case execution to finish

我在Java和TestNG框架中使用Selenium Webdriver。 我的测试用例之一是计划备份并检查备份是否按计划时间进行。 在指定时间启动备份后,大约需要12分钟才能完成备份。 同时,我想切换到其他测试用例。 关于如何使用Selenium WebDriver实现的任何想法

是的,您可以通过TestNG中的parellel属性来实现。 标签上的parallel属性可以采用以下值之一:

<suite name="My suite" parallel="methods" thread-count="5">
<suite name="My suite" parallel="tests" thread-count="5">
<suite name="My suite" parallel="classes" thread-count="5">
<suite name="My suite" parallel="instances" thread-count="5">

有关更多详细信息,请参见testNG文档。 http://testng.org/doc/documentation-main.html#parallel-tests

暂无
暂无

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

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