问题描述
我正在尝试将单元测试用例集成到现有的wso2代码库中。 有什么方法可以为我们的单元测试用例提供一个像Surefire报告这样的报告结构。
解决方法
您需要在您的 synapse-unit-test-maven-plugin
中添加插件 pom.xml
<plugin>
<groupId>org.wso2.maven</groupId>
<artifactId>synapse-unit-test-maven-plugin</artifactId>
<version>5.2.27</version>
<executions>
<execution>
<id>synapse-unit-test</id>
<phase>test</phase>
<goals>
<goal>synapse-unit-test</goal>
</goals>
</execution>
</executions>
<configuration>
<server>
<testServerType>${testServerType}</testServerType>
<testServerHost>${testServerHost}</testServerHost>
<testServerPort>${testServerPort}</testServerPort>
<testServerPath>${testServerPath}</testServerPath>
</server>
<testCasesFilePath>${project.basedir}/test/${testFile}</testCasesFilePath>
<mavenTestSkip>${maven.test.skip}</mavenTestSkip>
</configuration>
</plugin>
标签<testCasesFilePath>
的内容是单元测试的保存路径