mardi 10 octobre 2017

JUnit categories with multi module project - Unable to load category

I want to include/exclude JUnit categorized tests. I have a marker interface StressTest defined in a common module. I am referencing StressTest in moduleA. I have the following maven-surefire-plugin in root pom.xml

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20</version>
<configuration>
  <excludedGroups>com.mycompany.project.common.utils.StressTest</excludedGroups>
</configuration>
</plugin>

When running mvn test I get the following while building another module.

Unable to load category: com.mycompany.project.common.utils.StressTest

Where should I write my StressTest interface?

Aucun commentaire:

Enregistrer un commentaire