51Testing软件测试论坛
标题:
HTMLReporter TestNG 配置
[打印本页]
作者:
测试积点老人
时间:
2018-11-29 14:43
标题:
HTMLReporter TestNG 配置
testNG:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite
name="Suite"
verbose="1">
<test name="Saas_background_login">
<classes>
<!--<class name="com.your.className"/>-->
<class name="com.your.className"/>
</classes>
</test>
<listeners>
<listener class-name="org.uncommons.reportng.HTMLReporter"/>
<listener class-name="org.uncommons.reportng.JUnitXMLReporter"/>
</listeners>
</suite>
复制代码
pom.xml:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.5</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>src/test/resources/testng.xml</suiteXmlFile>
</suiteXmlFiles>
<properties>
<property>
<name>usedefaultlisteners</name>
<value>false</value>
</property>
<property>
<name>listener</name>
<value>org.uncommons.reportng.HTMLReporter, org.uncommons.reportng.JUnitXMLReporter</value>
</property>
</properties>
<reportsDirectory>report-output/</reportsDirectory>
<workingDirectory>target/</workingDirectory>
<forkMode>always</forkMode>
</configuration>
</plugin>
复制代码
<reportsDirectory>report-output/</reportsDirectory>
复制代码
将默认的report路径修改到report-output目录下
欢迎光临 51Testing软件测试论坛 (http://bbs.51testing.com/)
Powered by Discuz! X3.2