Maven Surefire Plugin: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 8: Line 8:


=Configuration Example=
=Configuration Example=
<pre>
<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
        <systemProperties>
            <property>
                <name>basedir</name>
                <value>${basedir}</value>
            </property>
        </systemProperties>
  </configuration>
</plugin>
</pre>


=Procedures=
=Procedures=

Revision as of 16:17, 11 January 2017

External

Internal

Configuration Example

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-surefire-plugin</artifactId>
    <configuration>
        <systemProperties>
            <property>
                <name>basedir</name>
                <value>${basedir}</value>
            </property>
        </systemProperties>
   </configuration>
</plugin>

Procedures

Debugging Tests

mvn -Dmaven.surefire.debug="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" test

Running Individual Tests

mvn -Dtest=TestCircle test

Works for both JUnit and TestNG.