0
我使用allure framevork + testNG進行報告測試。我想從maven平行運行只有一個測試類。如何在單線程中從Maven Surefire插件只運行一個TestNG類?
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${maven-surefire-plugin.version}</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<argLine>
-javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar"
</argLine>
<parallel>methods</parallel>
<threadCount>10</threadCount>
<!--suiteXmlFiles>
<suiteXmlFile>src/test/resources/testing.xml</suiteXmlFile>
</suiteXmlFiles-->
</configuration>
<dependencies>
<dependency>
<groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId>
<version>${aspectj.version}</version>
</dependency>
</dependencies>
</plugin>
- 如果我使用
<suiteXmlFiles>
,那麼AspectJ的就看不到我的測試中,比我需要寫在XML中的所有測試類(我不wan't做,因爲我使用aspectI) - 如果我在maven-surefire-plagin中設置
<parallel>
- 比所有類中的所有方法都平行。
也許我可以包括一個類並行?