由于Testng生成的测试报告不够直观,因此使用reportng来生成界面更为友好的测试报告,便于直观地分析测试结果。
环境:Eclipse,Maven
Testng的创建方式不多说,直接开始配置reportng。
一、创建依赖
在POM.xml中建立如下依赖:
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.10</version>
</dependency>
<dependency>
<groupId>velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.uncommons</groupId>
<artifactId>reportng</artifactId>