簡體   English   中英

如何創建與TestNG + Maven並行工作(套件)

[英]How creating parallel work to TestNG + Maven (Suits)

打敗話題,我知道。 但是,該站點上網絡上的所有決策都無法滿足您的要求:這是執行多線程 套件的方法。 目前,我發現了一種並行化套件的方法:

public class MultipleXmls {
public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException {
    TestNG testng = new TestNG();
    testng.setXmlSuites((List <XmlSuite>)(new Parser("C:\\Users\\S-Kerrigan\\WSI\\Java_ProjectsM_V.003\\Sets\\Suits\\TEST1.xml").parse()));
    testng.setSuiteThreadPoolSize(4);
    testng.run();
}
}

但是它不被淘汰-這種方法適合Java應用程序。 我需要從Maven以並行模式運行西裝。

我試過使用Grid-node子系統,在Maven和TestNG上讀取擴展塢-沒有什么可以幫助我的:(

你嘗試過這樣的事情嗎?

  <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <version>9.9.9.9</version> <configuration>> <parallel>methods</parallel> <threadCount>2</threadCount> <suitethreadpoolsize>2</suitethreadpoolsize> <suiteXmlFiles> <suiteXmlFile>testng-vm1.xml</suiteXmlFile> <suiteXmlFile>testng-vm2.xml</suiteXmlFile>> </suiteXmlFiles> </configuration> </plugin> 

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM