Maven Surefire Plugin: Difference between revisions
Jump to navigation
Jump to search
Line 10: | Line 10: | ||
=Configuration Example= | =Configuration Example= | ||
< | <syntaxhighlight lang='xml'> | ||
<plugin> | <plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | <groupId>org.apache.maven.plugins</groupId> | ||
Line 24: | Line 24: | ||
</configuration> | </configuration> | ||
</plugin> | </plugin> | ||
</ | </syntaxhighlight> | ||
Also see [[Testing_with_Gradle_Java_Plugin#Passing_System_Properties_to_Tests|Passing system properties to Gradle Tests]] | |||
=Attaching the Plugin to a Specific Phase= | =Attaching the Plugin to a Specific Phase= |
Revision as of 21:58, 25 October 2018
External
- http://maven.apache.org/surefire/maven-surefire-plugin/
- http://maven.apache.org/surefire/maven-surefire-report-plugin/
Internal
Configuration Example
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19.1</version>
<configuration>
<systemProperties>
<property>
<name>basedir</name>
<value>${basedir}</value>
</property>
</systemProperties>
</configuration>
</plugin>
Also see Passing system properties to Gradle Tests
Attaching the Plugin to a Specific Phase
Procedures
Debugging Tests
- Debugging Example: http://maven.apache.org/plugins/maven-surefire-plugin/examples/debugging.html]
mvn -Dmaven.surefire.debug="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" test
Running Individual Tests
- Single Test Example: http://maven.apache.org/plugins/maven-surefire-plugin/examples/single-test.html
mvn -Dtest=TestCircle test
Works for both JUnit and TestNG.