Skip report generation using TestNG and sure-fire plugin

自闭症网瘾萝莉.ら 提交于 2019-12-11 09:42:47

问题


I am new to TestNG framework. I don't want to generate reports using sure-fire plugin, is there any option to disable this. I also prefer to stop report generation using TestNG framework. In current situation, same report is getting generated 2 times, once by sure-fire plugin (under target directory) and once by TestNG framework (under test-output directory). Also, like if you could suggest some good tutorial on customizing the reports. The current reports are just too verbose. This is how I have configured sure-fire plugin.

<plugin>
       <groupId>org.apache.maven.plugins</groupId>
       <artifactId>maven-surefire-plugin</artifactId>
       <version>2.17</version>
       <configuration>
         <suiteXmlFiles>
           <suiteXmlFile>testng.xml</suiteXmlFile>
         </suiteXmlFiles>                 
       </configuration>
</plugin>

This is how my testng.xml looks

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
<suite name="Suite" parallel="none">
  <test name="Test">
    <classes>
      <class name="SampleTest"/>
      <methods>
        <exclude name="testRun"></exclude>
      </methods>
    </classes>
  </test> <!-- Test-->
</suite> <!-- Suite-->

Edit:

I am able to skip report by setting below property for maven-surefire-plugin. But this has skipped both the reports. I wish to generate at-least 1 brief report.

     <properties>
       <property>
           <name>usedefaultlisteners</name>
           <key>false</key>
       </property>
     </properties>

来源:https://stackoverflow.com/questions/24738103/skip-report-generation-using-testng-and-sure-fire-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!