问题描述
找不到从maven-surefire插件修改xml报告的方法。我正在使用Junit 5,maven-failsafe-plugin 3.0.0-M5 配置:
<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>
我的实际报告:
<?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>
最后想要这样的东西。字段类名将包含该方法的完整路径。
<?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>
也许有人有相似的经验
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)