Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Not A Bug
-
2.20.1
-
None
-
None
-
Mac OS Sierra 10.12.6, JDK 8u131
Description
My TestNG setup runs tests against a local server, which produce a lot of output, which generally includes a lot of JSON. That output is not formatted well in the HTML file output by the surefire plugin, because the HTML is not output with the <pre></pre> tag around it to maintain the JSON formatting. In addition, the <br/> tags at the end of each line of output create a lot of uneeded space. Can the plugin be updated to format the data better and maintain the output formatting from the test?
The file I'm referring to is in target/surefire-reports/Surefire suite/Surefire test.hml when I run 'mvn clean test'. I'm using the latest surefire plugin to date, 2.20.1, using test-ng 6.11.
Relevant pom.xml:
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>3.0.2</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<groups>${GROUPS}</groups>
<parallel>methods</parallel>
<threadCount>10</threadCount>
<systemPropertyVariables>
<rootDir>${rootDir}</rootDir>
<dnsPrefix>${dnsPrefix}</dnsPrefix>
<mode>${mode}</mode>
<ingress>${ingress}</ingress>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.11</version>
<scope>test</scope>
</dependency>
</dependencies>