自动化测试的三种报告输出 reportng & allure_Report & extent _Report

1.reportng

1 需要引入jar包 报告的格式简单 比较古老 可以修改源文件更改样式
一般不用
2 源码地址: https://github.com/dwdyer/reportng
3 添加依赖:

<!-- https://mvnrepository.com/artifact/org.uncommons/reportng -->
<dependency>
<groupId>org.uncommons</groupId>
<artifactId>reportng</artifactId>
<version>1.1.4</version>
<scope>test</scope>
</dependency>
<!-- https://mvnrepository.com/artifact/com.google.code.guice/guice -->
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
</dependency>
//再增加如下
<suiteXmlFiles>
<!--指定要执行的testngXml路径 -->
<suiteXmlFile>testng.xml</suiteXmlFile></suiteXmlFiles>			<testFailureIgnore>true</testFailureIgnore>
<argLine>-Dfile.encoding=UTF-8</argLine>
<systemPropertyVariables>
<org.uncommons.reportng.escapeoutput>false</org.uncommons.reportng.escape-output>
</systemPropertyVariables>
</configuration>

2.Allure Report

需要下载allure的包 再配置Allure 的环境变量 导入jar包依赖
会生成公网地址的报告,都可以访问
环境变量配置:
Path后追加allure的bin目录文件路径
在cmd中进入项目文件路径 输入allure serve即可生成报告

 
    io.qameta.allure
    allure-testng
    2.13.0
 

3. extent _Report

1 导入jar包依赖
2 需要在测试执行时执行监听 监听的java文件大部分由源码提供 可以修改标题等内容 可以加入失败截图 显示测试用例的描述或测试名称 源码官网查找
3 如果extent 的官网不好, 报告的显示格式无法引用官网的css文件 可以下载到本地后 替换报告中的css文件


	com.aventstack
	extentreports
	3.1.5


     org.aspectj
     aspectjweaver
     1.8.10
 

你可能感兴趣的:(软件测试,selenium)