您的位置:首页 > 其它

Testng测试报告设置那点事~

2017-06-14 15:45 260 查看
testng自带的report样式不美观,可以使用testng的一个plugin reportng来生成报告,具体的做法如下

使用intellij idea创建一个maven项目,在项目的pom.xml文件中引入reportng的dependency,具体如下:

4.0.0

TestNGProj
TestNGProj
1.0-SNAPSHOT

org.testng
testng
6.8.21

org.uncommons
reportng
1.1.4
test

org.testng
testng

com.google.inject
guice
3.0
test

org.apache.maven.plugins
maven-resources-plugin
2.5

org.apache.maven.plugins
maven-surefire-plugin
2.12

src/main/java/testng.xml
测试生成的报告
运行项目中的testng.xml文件,执行成功后,生成的报告地址位于项目的此目录下:test-output/html/index.html
例如:file:///Users/Vicky/Documents/vicky/TestNGProj/test-output/html/index.html。
生成的报告样式:
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  report testng