[SUREFIRE-745][SUREFIRE-1126] improved site
Project: http://git-wip-us.apache.org/repos/asf/maven-surefire/repo Commit: http://git-wip-us.apache.org/repos/asf/maven-surefire/commit/2824f940 Tree: http://git-wip-us.apache.org/repos/asf/maven-surefire/tree/2824f940 Diff: http://git-wip-us.apache.org/repos/asf/maven-surefire/diff/2824f940 Branch: refs/heads/master Commit: 2824f9408e751b383770a77d260a07d9f1d7e544 Parents: ca9eb3d Author: Tibor17 <tibo...@lycos.com> Authored: Thu Mar 26 01:05:11 2015 +0100 Committer: Tibor17 <tibo...@lycos.com> Committed: Thu Mar 26 01:05:11 2015 +0100 ---------------------------------------------------------------------- .../src/site/apt/examples/inclusion-exclusion.apt.vm | 2 ++ maven-surefire-plugin/src/site/apt/examples/single-test.apt.vm | 5 +++-- 2 files changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/2824f940/maven-surefire-plugin/src/site/apt/examples/inclusion-exclusion.apt.vm ---------------------------------------------------------------------- diff --git a/maven-surefire-plugin/src/site/apt/examples/inclusion-exclusion.apt.vm b/maven-surefire-plugin/src/site/apt/examples/inclusion-exclusion.apt.vm index 515fa18..f670786 100644 --- a/maven-surefire-plugin/src/site/apt/examples/inclusion-exclusion.apt.vm +++ b/maven-surefire-plugin/src/site/apt/examples/inclusion-exclusion.apt.vm @@ -166,6 +166,7 @@ Inclusions and Exclusions of Tests * Multiple Formats in One As of ${thisPlugin} Plugin 2.19, a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG): + +---+ [...] <include>%regex[.*[Cat|Dog].*], !%regex[pkg.*Slow.*.class], pkg/**/*Fast*.java, Basic????, !Unstable*</include> @@ -173,6 +174,7 @@ Inclusions and Exclusions of Tests <exclude>%regex[pkg.*Slow.*.class], Unstable*</exclude> [...] +---+ + This syntax can be used in parameters: test, includes, excludes, includesFile, excludesFile. Exclamation mark (!) excludes tests. The syntax in excludes and excludesFile should not use (!). The character (?) within non-regex pattern replaces one character in file name or path. The file extensions are not mandatory in http://git-wip-us.apache.org/repos/asf/maven-surefire/blob/2824f940/maven-surefire-plugin/src/site/apt/examples/single-test.apt.vm ---------------------------------------------------------------------- diff --git a/maven-surefire-plugin/src/site/apt/examples/single-test.apt.vm b/maven-surefire-plugin/src/site/apt/examples/single-test.apt.vm index dfa6a21..44448bd 100644 --- a/maven-surefire-plugin/src/site/apt/examples/single-test.apt.vm +++ b/maven-surefire-plugin/src/site/apt/examples/single-test.apt.vm @@ -121,13 +121,14 @@ mvn -Dit.test=ITCircle#testOne+testTwo verify Note this feature was available in JUnit 4 provider only since of ${thisPlugin} Plugin 2.12.1. +Multiple Formats in One As of ${thisPlugin} Plugin 2.19 multiple formats are supported in one pattern (JUnit 4, JUnit 4.7+, TestNG): #{if}(${project.artifactId}=="maven-surefire-plugin") +---+ mvn "-Dtest=???Test, !Unstable*, pkg/**/Ci*leTest.java, *Test#test*One+testTwo?????, #fast*+slowTest" test -mvn "-Dtest=Basic*, !%regex[.*.Unstable.*], !%regex[.*.MyTest.class#one.*|two.*], %regex[#fast.*|slow.*]" +mvn "-Dtest=Basic*, !%regex[.*.Unstable.*], !%regex[.*.MyTest.class#one.*|two.*], %regex[#fast.*|slow.*]" test +---+ #{else} +---+ @@ -141,4 +142,4 @@ mvn "-Dit.test=Basic*, !%regex[.*.Unstable.*], !%regex[.*.MyIT.class#one.*|two.* The regex validates fully qualified class file, and validates test methods separately after (#) however class is optional. The regex supports '.class' file extension only. Note the regex comments, marked by (#) character, are unsupported. The Parameterized JUnit runner describes test methods using an index in brackets, so the - non-regex method pattern would become: <<<#testMethod[*]>>>. + non-regex method pattern would become <<<#testMethod[*]>>>.