使用maven运行testng文件时,提示 no tests to run

首先,使用maven结合testng文件时,需要在pom文件中添加

        <artifactId>maven-surefire-plugin</artifactId>

        <version>2.22.1</version>

        <configuration>

            <suiteXmlFiles>

                <suiteXmlFile>src/main/resources/testng.xml</suiteXmlFile>(此处要注意一定是需要写你的testng的路径,否则会出错)

            </suiteXmlFiles>

        </configuration>

    </plugin>

猜你喜欢

转载自blog.csdn.net/ningmengbu_suan/article/details/105845231
今日推荐