1、pom.xml文件中添加依赖,重构一下项目(mvn compile)

<dependency>
<groupId>org.uncommons</groupId>
<artifactId>reportng</artifactId>
<version>1.1.4</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
</exclusion>
</exclusions>
</dependency>

2、在testng.xml中的suite下添加监听
<listeners >
<listener class-name="org.uncommons.reportng.HTMLReporter"/>
<listener class-name="org.uncommons.reportng.JUnitXMLReporter"/>
</listeners>

3、运行testng.xml,可以看到生成了test-output目录

testng中使用reportng报告

4、打开index.html,可以看到界面比较清晰友好的测试报告

testng中使用reportng报告

 

 

 


 
                    
            
                

相关文章:

  • 2021-10-12
  • 2021-12-26
  • 2021-10-16
  • 2022-01-06
  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-09-13
  • 2021-06-01
  • 2021-11-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案