Maven项目中mvn test执行TestNG配置文件

           <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>3.0.0-M5</version>
                <configuration>
                    <!-- Suite testng xml file to consider for test execution -->
                    <suiteXmlFiles>
                    <!--mvn test命令默认执行的testng.xml文件名 -->
                        <suiteXmlFile>testng2.xml</suiteXmlFile>
                    </suiteXmlFiles>
                    <!--mvn test命令输出默认报告的文件目录 -->
                    <reportsDirectory>${basedir}/test-out</reportsDirectory>

                </configuration>
            </plugin>
posted @ 2021-05-09 19:41  自主学习  阅读(352)  评论(0编辑  收藏  举报