maven 中引入jar 包

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

<!-- https://mvnrepository.com/artifact/com.google.inject/guice -->
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
</dependency>

在Testng 中添加监听器就好了

<?xml version="1.0" encoding="UTF-8"?>
<suite name="Suite1" verbose="1">
<test name="CheckName">
<classes>
<class name="com.luray.testsuite.CheckStockList" />
</classes>
</test>

<listeners>
<listener class-name="org.uncommons.reportng.HTMLReporter" />
<listener class-name="org.uncommons.reportng.JUnitXMLReporter" />
</listeners>
</suite>

 

生成的测试报告在工程下的test-output中的html 文件夹下的index.html 

reportNg 的生成

 

相关文章:

  • 2018-04-16
  • 2022-12-23
  • 2021-12-26
  • 2021-10-16
  • 2022-01-06
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-21
  • 2022-12-23
  • 2021-06-01
  • 2022-12-23
  • 2021-11-06
  • 2021-06-25
  • 2021-07-25
相关资源
相似解决方案