开发者社区> 问答> 正文

在pom.xml文件的并行测试中需要帮助

我有100个Java类文件供测试。

我想用4个xml文件将它们分开。(分为以下xml文件的100个类)

testng1.xml
testng2.xml
testng3.xml
testng4.xml

testng.xml文件

<suite name="MainSuite" >
    <listeners>
        <listener class-name="org.uncommons.reportng.HTMLReporter"/>
        <listener class-name="org.uncommons.reportng.JUnitXMLReporter"/>
    </listeners>
    <suite-files>
        <suite-file path="testng1.xml" />
        <suite-file path="testng2.xml" />
        <suite-file path="testng3.xml" />
        <suite-file path="testng4.xml" />
    </suite-files>
 </suite>

pom.xml文件

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <version>3.0.0-M4</version>
    <configuration>
        <suiteXmlFiles>
            <suiteXmlFile>testng.xml</suiteXmlFile>
        </suiteXmlFiles>
        <properties>
            <property>
                <name>suitethreadpoolsize</name>
                <value>4</value>
            </property>
        </properties>
    </configuration>
</plugin>

当执行(MVN干净测试)时,它开始执行,但我找不到失败的地方。

我想为失败和通过不同类的通过类生成适当的报告。

我已经尝试过ReportNG,但是它无法从testng生成报告,因为我正在从POM.xml运行项目(MVN干净测试)

展开
收起
几许相思几点泪 2019-12-17 18:08:42 844 0
1 条回答
写回答
取消 提交回答
  • 技术架构师 阿里云开发者社区技术专家博主 CSDN签约专栏技术博主 掘金签约技术博主 云安全联盟专家 众多开源代码库Commiter

    这个就得多次检查,多次测试

    2019-12-28 14:36:33
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
移动互联网测试到质量的转变 立即下载
给ITer的技术实战进阶课-阿里CIO学院独家教材(四) 立即下载
F2etest — 多浏览器兼容性测试整体解决方案 立即下载