Unit Test Case reporting for WSO2 EI

121 views Asked by At

I am trying to integrate Unit Test cases in my existing wso2 code base. Is there any way we can have a reporting structure like Surefire reports for our Unit Test Cases.

1

There are 1 answers

0
Alexis Gramaglia On

You need to add the plugin synapse-unit-test-maven-plugin in your 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>

The content of the tag <testCasesFilePath> is the path where units tests are saved