I have a situation I am trying to debug: running mvn test on openmrs-core on my dev machine passes, but there is a failure when Jenkins runs.
java.lang.AssertionError: org.openmrs.test should be a directory
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.assertTrue(Assert.java:41)
at org.openmrs.OpenmrsTestsTest.getClasses(OpenmrsTestsTest.java:160)
...
If anybody has an idea why that might be happening, please let me know.
But meanwhile, I am using this as a reason to learn the Maven/Spring/OpenMRS testing infrastructure, and I ran across this in the openmrs-core-api pom.xml file:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude>**/test/*</exclude>
<!-- Exclude mail test, slows build, breaks portability with requirements on port 25 -->
<exclude>**/notification/MessageServiceTest.java</exclude>
</excludes>
</configuration>
</plugin>
I'm particularly interested in the highlighted line --- to me it looks as if this is saying "don't actually run any tests". This line has been in the pom file since 2012, so I assume it is supposed to be that way. Could somebody explain to me why it is there, and how the tests actually get run?
thanks,
denise