Class TestJavaFragmentMojo

java.lang.Object
org.apache.maven.plugin.AbstractMojo
com.tibco.ep.buildmavenplugin.TestJavaFragmentMojo
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

@Mojo(name="test-java-fragment", defaultPhase=TEST, threadSafe=true) public class TestJavaFragmentMojo extends org.apache.maven.plugin.AbstractMojo

Test a java fragment using junit and surefire.

A java runner for surefire is created and deployed to the test nodes - this runner invokes surefire and hence junit to run the test cases.

The java runner takes the configured reportsDirectory property and appends the node name - the node specific test report files are created in this directory. When all the test have finished, these node specific test reports are renamed into the configured reportsDirectory directory.

The maven property jenkins.executionId.reportsDirectory is set so that jenkins can locate the test reports.

Java assertions are always enabled. Options file is always ignored.

The following system properties are set :

  • com.tibco.ep.dtm.fragment.version - fragment version
  • com.tibco.ep.dtm.fragment.identifier - fragment identifier

Nodes are terminated on unit test failure, unless skipStop is set.