Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
94 commits
Select commit Hold shift + click to select a range
18223b4
use junit plaform runner for junit 4.4
olamy Sep 14, 2025
fb603c3
fix some compilation
olamy Sep 17, 2025
f8c4e75
expecting changes here
olamy Sep 17, 2025
8dc4399
fix the NPEs
olamy Sep 17, 2025
183bef9
fix unit tests
olamy Sep 18, 2025
3262f51
those timing tests are so flaky
olamy Sep 19, 2025
22f29bc
spotless
olamy Sep 19, 2025
69b03c8
add version range as vintage can be used only from 4.12
olamy Sep 19, 2025
18bc714
restore test
olamy Sep 19, 2025
f707c64
Force junit 4 to use 4.12 as minimum with platform engine
olamy Sep 22, 2025
8b8354c
avoid some NPE
olamy Sep 23, 2025
bb728b2
remove surefire junit4, 47 code
olamy Sep 24, 2025
d9cdef3
junit 4.12
olamy Sep 24, 2025
3767943
more renaming
olamy Sep 24, 2025
3fdeaaa
remove duplicate line
olamy Sep 24, 2025
a7454a8
more its upgrade to 4.12
olamy Sep 24, 2025
8249948
remove junit 3 provider, update to junit 4 (#3190)
sebtiem Sep 24, 2025
9ba79b8
more its migration to junit 4.12
olamy Sep 24, 2025
dff7835
more its migration to junit 4.12
olamy Sep 24, 2025
1456813
more its migration to junit 4.12
olamy Sep 24, 2025
526797b
more its migration to junit 4.12
olamy Sep 24, 2025
79685b1
spotless:apply
olamy Sep 24, 2025
c3b3b76
remove junit 3 support (#3191)
sebtiem Sep 24, 2025
ef49e71
fix missing remove modules
olamy Sep 24, 2025
b5a9e18
no need of specific 4.7 tests
olamy Sep 25, 2025
1ad0c29
restore provider parameters
olamy Sep 25, 2025
ae3c46d
no more pojo simple
olamy Sep 27, 2025
4296349
no more pojo simple
olamy Sep 27, 2025
8db3095
fix turning parallel from junit4 to junit.vintage.execution.parallel
olamy Sep 27, 2025
fc2d038
enable test launchers to expect errors in log after execution
sebtiem Sep 26, 2025
310401d
add unsupported error and test
sebtiem Sep 26, 2025
fd153bc
remove unnecessary packages from test
sebtiem Sep 26, 2025
35ab340
use version range, add tests for JUnit 4 versions, adjust naming of s…
sebtiem Oct 1, 2025
c1d7304
move unsupported versions tests to one file
sebtiem Oct 2, 2025
58a36ae
refine method call of expected failing tests with specific error message
sebtiem Oct 2, 2025
6c7dfc9
tidy up
sebtiem Oct 2, 2025
52e82ae
apply spotless
sebtiem Oct 6, 2025
a64951b
use junit 4 in failsafe plugin ITs
sebtiem Oct 6, 2025
cb9943c
add null safety, more usable exception message
sebtiem Oct 7, 2025
3ffb0d5
Handle Category from junit4
olamy Oct 7, 2025
68d0cc9
do not restrict too old junit for all runners
olamy Oct 8, 2025
6e8004e
use testng runner with junit platform runner
olamy Oct 9, 2025
cf3793d
remove potential double catching, adjust IT to modified log message (…
sebtiem Oct 10, 2025
8b77120
TestNG only from 6.14.3
olamy Oct 10, 2025
34b63ee
testng removal
olamy Oct 10, 2025
6626d54
Bumping version to 3.6.0-SNAPSHOT
olamy Oct 10, 2025
a97b791
map testng configuration to junit platform runner
olamy Oct 10, 2025
9b28918
fix some of testng version as minimum supported is now 6.14.3
olamy Oct 11, 2025
d84a085
be carefull with testng groups properties not mapped on tags filter
olamy Oct 11, 2025
132666a
remove not existing dependencies
olamy Oct 13, 2025
16f0987
tests can run both vintage and testng engines
olamy Oct 13, 2025
01235ee
file names have changed
olamy Oct 13, 2025
679fbea
remove surefire-grouper
olamy Oct 14, 2025
2919141
fix potential NPE while reporting results
sebtiem Oct 14, 2025
a38f29f
disable running junit test if there is a property junit to false
olamy Oct 16, 2025
240fc8f
fix unit test
olamy Oct 16, 2025
ae73ff4
fix test ng version check, ensure order by last modified value from file
olamy Oct 18, 2025
459f147
fix IT for skipped with TestNG
olamy Oct 18, 2025
6caf589
remove testng which does not make sense anymore
olamy Oct 19, 2025
a9a3bdf
fix IT
olamy Oct 19, 2025
07f5880
fix IT
olamy Oct 19, 2025
16fbac5
fix IT (#3206)
sebtiem Oct 20, 2025
0d4bf89
Remove junit platform runner junit4 (#3207)
sebtiem Oct 20, 2025
500e59e
Revert "remove testng which does not make sense anymore"
olamy Oct 21, 2025
9b9fde1
fix testng reporter/listener
olamy Oct 21, 2025
dd0d6f8
remove not anymore needed test
olamy Oct 21, 2025
09228d3
testng suitexml not supported anymore with testng-engine
olamy Oct 21, 2025
c0e9fa1
fix ReportersIT
olamy Oct 21, 2025
71779b4
FIx Surefire1082ParallelJUnitParameterizedIT
olamy Oct 21, 2025
11629b8
finally fix includes/excludes with junit4
olamy Oct 30, 2025
6856f1d
fix issues with handling of / in selector
olamy Oct 30, 2025
bc0e2ac
fix IT
olamy Oct 30, 2025
227f0f2
add includes/excludes ITs for junit5
olamy Oct 30, 2025
70479c0
TestNG suite xml is not supported anymore
olamy Oct 30, 2025
08ce682
spotless
olamy Oct 30, 2025
df11666
missing changes due to removal of testng suitexml
olamy Oct 30, 2025
a52acd7
fix issue with -Dtest
olamy Oct 31, 2025
8872a17
setup junit bom
olamy Nov 1, 2025
654e501
not supported anymore
olamy Nov 2, 2025
c23d4d0
fix junit vintage setup
olamy Nov 3, 2025
1d622f2
fixing my bad
olamy Nov 5, 2025
777c061
fix -Dtest usage
olamy Nov 5, 2025
23fa786
No adding junit-vintage-engine if already a dependency
olamy Nov 5, 2025
465cbd0
testng suite xml not supported anymore
olamy Nov 5, 2025
2b31339
groups expression not supported anymore
olamy Nov 5, 2025
60b8675
fixes with api dependencies manipulation
olamy Nov 6, 2025
dff95fb
fixing method pattern
olamy Nov 6, 2025
f680dc4
test junit parallel testing
olamy Nov 6, 2025
48ab021
fix -Dtest documentation, inclusion of junit engine
olamy Nov 9, 2025
f1b3d71
fix selector for simple class name
olamy Nov 9, 2025
31985b1
fix class pattern with method name
olamy Nov 9, 2025
9129db9
fix management of non documented sysproperty junit
olamy Nov 9, 2025
5818c66
one more fix
olamy Nov 10, 2025
a08a2c1
junit3 provider configuration not supported anymore
olamy Nov 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
~ specific language governing permissions and limitations
~ under the License.
-->

<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >

<suite name="Suite 2 Test" verbose="4">

<test name="Sample Test 2">
<classes>
<class name="testng.suiteXml.TestNGSuiteTest"/>
</classes>
</test>

</suite>
<extensions>
<extension>
<groupId>eu.maveniverse.maven.mimir</groupId>
<artifactId>extension3</artifactId>
<version>0.10.4</version>
</extension>
<extension>
<groupId>org.apache.maven.extensions</groupId>
<artifactId>maven-build-cache-extension</artifactId>
<version>1.2.1</version>
</extension>
</extensions>
92 changes: 92 additions & 0 deletions .mvn/maven-build-cache-config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<!--
~ Licensed to the Apache Software Foundation (ASF) under one
~ or more contributor license agreements. See the NOTICE file
~ distributed with this work for additional information
~ regarding copyright ownership. The ASF licenses this file
~ to you under the Apache License, Version 2.0 (the
~ "License"); you may not use this file except in compliance
~ with the License. You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing,
~ software distributed under the License is distributed on an
~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
~ KIND, either express or implied. See the License for the
~ specific language governing permissions and limitations
~ under the License.
-->
<cache xmlns="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/BUILD-CACHE-CONFIG/1.0.0 https://maven.apache.org/xsd/build-cache-config-1.0.0.xsd">
<configuration>
<enabled>true</enabled>
<!-- activated via cli -->
<!-- to disable it just use -Dmaven.build.cache.enabled=false -->
</configuration>
<input>
<global>
<glob>{*.java,*.xml,*.properties,*.mod,*.adoc}</glob>
<excludes>
<exclude>*Jenkinsfile*</exclude>
<exclude>./idea/*</exclude>
</excludes>
</global>
<plugins>
<plugin groupId="org.apache.maven.plugins" artifactId="maven-surefire-plugin">
<effectivePom>
<excludeProperties>
<excludeProperty>systemPropertyVariables</excludeProperty>
</excludeProperties>
</effectivePom>
</plugin>
</plugins>
</input>
<executionControl>
<runAlways>
<goalsLists>
<goalsList artifactId="maven-install-plugin">
<goals>
<goal>install</goal>
</goals>
</goalsList>
<goalsList artifactId="maven-deploy-plugin">
<goals>
<goal>deploy</goal>
</goals>
</goalsList>
<goalsList artifactId="docker-maven-plugin">
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</goalsList>
</goalsLists>
</runAlways>
<reconcile>
<plugins>
<plugin artifactId="maven-surefire-plugin" goal="test">
<reconciles>
<reconcile propertyName="skip" skipValue="true"/>
<reconcile propertyName="skipExec" skipValue="true"/>
<reconcile propertyName="skipTests" skipValue="true"/>
<reconcile propertyName="test" skipValue="true"/>
</reconciles>
<nologs>
<nolog propertyName="systemPropertyVariables"/>
</nologs>
</plugin>
<plugin artifactId="maven-failsafe-plugin" goal="integration-test">
<reconciles>
<reconcile propertyName="skip" skipValue="true"/>
<reconcile propertyName="skipExec" skipValue="true"/>
<reconcile propertyName="skipTests" skipValue="true"/>
<reconcile propertyName="test" skipValue="true"/>
</reconciles>
<nologs>
<nolog propertyName="systemPropertyVariables"/>
</nologs>
</plugin>
</plugins>
</reconcile>
</executionControl>
</cache>
3 changes: 0 additions & 3 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,6 @@ static def sourcesPatternCsv() {
'**/surefire-booter/src/main/java,' +
'**/surefire-extensions-api/src/main/java,' +
'**/surefire-extensions-spi/src/main/java,' +
'**/surefire-grouper/src/main/java,' +
'**/surefire-its/src/main/java,' +
'**/surefire-logger-api/src/main/java,' +
'**/surefire-providers/**/src/main/java,' +
Expand All @@ -230,7 +229,6 @@ static def classPatternCsv() {
'**/surefire-booter/target/classes,' +
'**/surefire-extensions-api/target/classes,' +
'**/surefire-extensions-spi/target/classes,' +
'**/surefire-grouper/target/classes,' +
'**/surefire-its/target/classes,' +
'**/surefire-logger-api/target/classes,' +
'**/surefire-providers/**/target/classes,' +
Expand All @@ -245,7 +243,6 @@ static def testReportsPatternCsv() {
'**/maven-surefire-report-plugin/target/surefire-reports/*.xml,' +
'**/surefire-api/target/surefire-reports/*.xml,' +
'**/surefire-booter/target/surefire-reports/*.xml,' +
'**/surefire-grouper/target/surefire-reports/*.xml,' +
'**/surefire-its/target/surefire-reports/*.xml,' +
'**/surefire-logger-api/target/surefire-reports/*.xml,' +
'**/surefire-providers/**/target/surefire-reports/*.xml,' +
Expand Down
7 changes: 1 addition & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,16 +70,11 @@ Build the Surefire project using **Maven 3.6.3+** and **JDK 8+**.
```
mvn install -P ide-development -f surefire-shared-utils/pom.xml
```
* Build module `surefire-grouper` in order to generate and compile sources into `target/generated-sources/javacc` using this Maven command:
```
mvn compile -f surefire-grouper/pom.xml
```

* In Eclipse, select _File > Import ... > Maven Project_

* Select all projects (poms) except `surefire-shared-utils`,
enter profile `ide-development` in _Advanced -> Profiles_
* Check module `surefire-grouper` has source folder `target/generated-sources/javacc`.
If not, add it manually in the module's project properties
* In IntelliJ, select _Maven > Profiles_ and check `ide-development`

### Deploying web site
Expand Down
2 changes: 1 addition & 1 deletion maven-failsafe-plugin/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
<version>3.5.5-SNAPSHOT</version>
<version>3.6.0-SNAPSHOT</version>
</parent>

<groupId>org.apache.maven.plugins</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion maven-failsafe-plugin/src/it/multiple-summaries/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion maven-failsafe-plugin/src/it/working-directory/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.2</version>
<version>4.13.2</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

import java.io.File;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;

import org.apache.maven.plugin.MojoExecutionException;
Expand Down Expand Up @@ -86,13 +84,12 @@ public class IntegrationTestMojo extends AbstractSurefireMojo {
* <code>**{@literal /}${it.test}.java</code>, so you can just type {@code -Dit.test=MyIT} to run
* a single test file called "foo/MyIT.java". The test patterns prefixed with a <em>!</em> will be excluded.
* <br>
* This parameter overrides the parameter {@code includes} and {@code excludes}, and the TestNG parameter
* {@code suiteXmlFiles}.
* This parameter overrides the parameter {@code includes} and {@code excludes}.
* <br>
* Since 2.7.3 You can execute a limited number of methods in the test with adding <i>#myMethod</i> or
* <i>#my*ethod</i>. E.g. type {@code -Dit.test=MyIT#myMethod} <b>supported for junit 4.x and TestNg.</b>
* <br>
* Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG):
* Since 2.19 a complex syntax is supported in one parameter:
* <pre><code>"-Dit.test=???IT, !Unstable*, pkg{@literal /}**{@literal /}Ci*leIT.java, *IT#test*One+testTwo?????, #fast*+slowTest"</code></pre>
* or e.g.
* <br>
Expand Down Expand Up @@ -231,7 +228,6 @@ public class IntegrationTestMojo extends AbstractSurefireMojo {
* {@literal <include>}%regex[.*[Cat|Dog].*], !%regex[pkg.*Slow.*.class], pkg{@literal /}**{@literal /}*Fast*.java{@literal </include>}
* </code></pre>
* <br>
* This parameter is ignored if the TestNG {@code suiteXmlFiles} parameter is specified.<br>
* <br>
* <b>Notice that</b> these values are relative to the directory containing generated test classes of the project
* being tested. This directory is declared by the parameter {@code testClassesDirectory} which defaults
Expand All @@ -252,8 +248,6 @@ public class IntegrationTestMojo extends AbstractSurefireMojo {
* </code></pre>
* (which excludes all inner classes).
* <br>
* This parameter is ignored if the TestNG {@code suiteXmlFiles} parameter is specified.
* <br>
* Each exclude item may also contain a comma-separated sub-list of items, which will be treated as multiple
* {@literal <exclude>} entries.<br>
* Since 2.19 a complex syntax is supported in one parameter (JUnit 4, JUnit 4.7+, TestNG):
Expand Down Expand Up @@ -314,6 +308,7 @@ public class IntegrationTestMojo extends AbstractSurefireMojo {
private int rerunFailingTestsCount;

/**
* @deprecated not supported after 3.6.0, please use groups or Junit suite support
* (TestNG) List of &lt;suiteXmlFile&gt; elements specifying TestNG suite xml file locations. Note that
* {@code suiteXmlFiles} is incompatible with several other parameters of this plugin, like
* {@code includes} and {@code excludes}.<br>
Expand Down Expand Up @@ -898,17 +893,6 @@ public void setExcludes(List<String> excludes) {
this.excludes = excludes;
}

@Override
public File[] getSuiteXmlFiles() {
return suiteXmlFiles.clone();
}

@Override
@SuppressWarnings("UnusedDeclaration")
public void setSuiteXmlFiles(File[] suiteXmlFiles) {
this.suiteXmlFiles = suiteXmlFiles.clone();
}

@Override
public String getRunOrder() {
return runOrder;
Expand Down Expand Up @@ -950,16 +934,6 @@ protected void setUseModulePath(boolean useModulePath) {
this.useModulePath = useModulePath;
}

@Override
protected final List<File> suiteXmlFiles() {
return hasSuiteXmlFiles() ? Arrays.asList(suiteXmlFiles) : Collections.<File>emptyList();
}

@Override
protected final boolean hasSuiteXmlFiles() {
return suiteXmlFiles != null && suiteXmlFiles.length != 0;
}

@Override
protected final ForkNodeFactory getForkNode() {
return forkNode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ public class VerifyMojo extends AbstractMojo implements SurefireReportParameters
@Parameter(defaultValue = "${session}", readonly = true)
private MavenSession session;

private final Logger logger;
private Logger logger = LoggerFactory.getLogger(getClass());

private Collection<CommandLineOption> cli;

private volatile PluginConsoleLogger consoleLogger;
private volatile PluginConsoleLogger consoleLogger = new PluginConsoleLogger(logger);

public VerifyMojo() {
this.logger = LoggerFactory.getLogger(getClass());
//
}

public VerifyMojo(Logger logger) {
Expand Down
8 changes: 7 additions & 1 deletion maven-surefire-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.apache.maven.surefire</groupId>
<artifactId>surefire</artifactId>
<version>3.5.5-SNAPSHOT</version>
<version>3.6.0-SNAPSHOT</version>
</parent>

<artifactId>maven-surefire-common</artifactId>
Expand Down Expand Up @@ -178,6 +178,12 @@
</dependencies>

<build>
<resources>
<resource>
<filtering>true</filtering>
<directory>src/main/resources</directory>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.jacoco</groupId>
Expand Down
Loading
Loading