You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Chris Plummer (JIRA)" <ji...@apache.org> on 2017/09/27 17:49:00 UTC

[jira] [Created] (SUREFIRE-1425) Surefire test.html does not keep output formatting

Chris Plummer created SUREFIRE-1425:
---------------------------------------

             Summary: Surefire test.html does not keep output formatting
                 Key: SUREFIRE-1425
                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1425
             Project: Maven Surefire
          Issue Type: Bug
          Components: Maven Surefire Plugin, TestNG support
    Affects Versions: 2.20.1
         Environment: Mac OS Sierra 10.12.6, JDK 8u131
            Reporter: Chris Plummer
            Priority: Minor


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>



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)