简体   繁体   English

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

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

I am using selenium webdriver with java and TestNG framework. 我在Java和TestNG框架中使用Selenium Webdriver。 One of my testcases is to schedule backup and check if backup occurs on scheduled time. 我的测试用例之一是计划备份并检查备份是否按计划时间进行。 after the backup is initiated at given time, it takes 12 min approx to finish backup. 在指定时间启动备份后,大约需要12分钟才能完成备份。 I want to switch to other testcases meanwhile . 同时,我想切换到其他测试用例。 Any ideas on how it can be accomplished using selenium webdriver 关于如何使用Selenium WebDriver实现的任何想法

Yes you can achieve this through parellel attribute in TestNG. 是的,您可以通过TestNG中的parellel属性来实现。 The parallel attribute on the tag can take one of following values: 标签上的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">

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

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

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