@@ -376,7 +376,7 @@ currently only works with Surefire 2.19.1.
376
376
...
377
377
<plugin>
378
378
<artifactId>maven-surefire-plugin</artifactId>
379
- <version>2.19</version>
379
+ <version>2.19.1 </version>
380
380
<dependencies>
381
381
<dependency>
382
382
<groupId>org.junit.platform</groupId>
@@ -409,7 +409,7 @@ dependencies of the `maven-surefire-plugin` similar to the following.
409
409
...
410
410
<plugin>
411
411
<artifactId>maven-surefire-plugin</artifactId>
412
- <version>2.19</version>
412
+ <version>2.19.1 </version>
413
413
<dependencies>
414
414
<dependency>
415
415
<groupId>org.junit.platform</groupId>
@@ -451,7 +451,7 @@ the dependencies of the `maven-surefire-plugin` similar to the following.
451
451
...
452
452
<plugin>
453
453
<artifactId>maven-surefire-plugin</artifactId>
454
- <version>2.19</version>
454
+ <version>2.19.1 </version>
455
455
<dependencies>
456
456
<dependency>
457
457
<groupId>org.junit.platform</groupId>
@@ -481,13 +481,38 @@ the dependencies of the `maven-surefire-plugin` similar to the following.
481
481
...
482
482
----
483
483
484
+ [[running-tests-build-maven-test-system-property]]
485
+ ===== Running a Single Test Class
486
+
487
+ The JUnit Platform Surefire Provider supports the `test` JVM system property supported by
488
+ the Maven Surefire Plugin. For example, to run only test methods in the
489
+ `org.example.MyTest` test class you can execute `mvn -Dtest=org.example.MyTest test` from
490
+ the command line. For further details, consult the
491
+ https://maven.apache.org/surefire/maven-surefire-plugin/examples/single-test.html[Maven Surefire Plugin]
492
+ documentation.
493
+
494
+ [[running-tests-build-maven-filter-test-class-names]]
495
+ ===== Filtering by Test Class Names
496
+
497
+ The Maven Surefire Plugin will scan for test classes whose fully qualified names match
498
+ the following patterns.
499
+
500
+ - `+**/Test*.java+`
501
+ - `+**/*Test.java+`
502
+ - `+**/*TestCase.java+`
503
+
504
+ Note, however, that you can override this default behavior by configuring explicit
505
+ `include` and `exclude` rules in your `pom.xml` file. See the
506
+ https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html[Inclusions and Exclusions of Tests]
507
+ documentation for Maven Surefire for details.
508
+
484
509
[[running-tests-build-maven-filter-tags]]
485
510
===== Filtering by Tags
486
511
487
512
You can filter tests by tags using the following configuration properties.
488
513
489
- - to include a tag, use either `groups` or `includeTags`
490
- - to exclude a tag, use either `excludedGroups` or `excludeTags`
514
+ - To include a tag, use either `groups` or `includeTags`.
515
+ - To exclude a tag, use either `excludedGroups` or `excludeTags`.
491
516
492
517
[source,xml,indent=0]
493
518
----
@@ -497,7 +522,7 @@ You can filter tests by tags using the following configuration properties.
497
522
...
498
523
<plugin>
499
524
<artifactId>maven-surefire-plugin</artifactId>
500
- <version>2.19</version>
525
+ <version>2.19.1 </version>
501
526
<configuration>
502
527
<properties>
503
528
<includeTags>acceptance</includeTags>
@@ -528,7 +553,7 @@ the `configurationParameters` property and providing key-value pairs in the Java
528
553
...
529
554
<plugin>
530
555
<artifactId>maven-surefire-plugin</artifactId>
531
- <version>2.19</version>
556
+ <version>2.19.1 </version>
532
557
<configuration>
533
558
<properties>
534
559
<configurationParameters>
0 commit comments