Failsafe report modification 'classname' field

217 views Asked by At

Can't find the way how to modify xml report from maven-surefire plugin. I am using Junit 5 , maven-failsafe-plugin 3.0.0-M5 with configuration:

<plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>3.0.0-M5</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                        <configuration>
                            <statelessTestsetReporter implementation="org.apache.maven.plugin.surefire.extensions.junit5.JUnit5Xml30StatelessReporter">
                                <disable>false</disable>
                                <usePhrasedFileName>false</usePhrasedFileName>
                                <usePhrasedTestSuiteClassName>true</usePhrasedTestSuiteClassName>
                                <usePhrasedTestCaseClassName>true</usePhrasedTestCaseClassName>
                                <usePhrasedTestCaseMethodName>true</usePhrasedTestCaseMethodName>
                            </statelessTestsetReporter>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

My actual report:

<?xml version="1.0" encoding="UTF-8"?>
<testsuite >
  <properties>
    ...
  </properties>
  <testcase name="This comes from @DisplayName()" classname="com.my.project.ClassName" time="0.945"/>
</testsuite>

Would like to have in the end something like this. Field classname will contain full path to the method.

<?xml version="1.0" encoding="UTF-8"?>
<testsuite >
  <properties>
    ...
  </properties>
  <testcase name="This comes from @DisplayName()" classname="com.my.project.ClassName.testMethodName" time="0.945"/>
</testsuite>

Maybe some one have similar expirience

0

There are 0 answers