我希望以自己的方式自定义报告,而不是在默认饼图中生成报告 示例:条形图或任何其他类型的表示 我在pom.xml中使用此代码 任何人都建议我使用POM.xml中的Xslt自定义
<reporting>
<plugins>
<!-- TestNG-xslt related configuration. -->
<plugin>
<groupId>org.reportyng</groupId>
<artifactId>reporty-ng</artifactId>
<version>1.2</version>
<configuration>
<!-- Output directory for the testng xslt report -->
<outputdir>/target/testng-xslt-report/index.html</outputdir>
<sorttestcaselinks>true</sorttestcaselinks>
<testdetailsfilter>FAIL,SKIP,PASS,CONF,BY_CLASS</testdetailsfilter>
<showruntimetotals>true</showruntimetotals>
<cssFile>myCustomStyle.css</cssFile>
</configuration>
</plugin>
</plugins>
</reporting>
答案 0 :(得分:0)
您可以简单地开发自己的自定义html结果文件,而不是自定义reportNG。然后您可以拥有任何您想要的结构。
您所要做的就是编写自己的自定义记者类,并在测试方法运行时将信息记录在其中,完成后只需保存并关闭项目文件夹中的文件。
虽然您将编写更多代码,但您的设计会更灵活。