簡體   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