Added supprot for TestNG 7.10.0

This commit is contained in:
Erik C. Thauvin 2024-04-07 14:23:35 -07:00
parent 645e6d104a
commit d74ee9d819
Signed by: erik
GPG key ID: 776702A6A2DA330E
6 changed files with 44 additions and 8 deletions

View file

@ -34,6 +34,5 @@ Don't forget to add a TestNG `test` dependency to your build file, as it is not
```java
repositories = List.of(MAVEN_CENTRAL);
scope(test).include(dependency("org.testng", "testng", version(7, 9, 0)));
scope(test).include(dependency("org.testng", "testng", version(7, 10, 0)));
```

View file

@ -1,6 +1,6 @@
bld.downloadExtensionJavadoc=false
bld.downloadExtensionSources=true
bld.extensions=com.uwyn.rife2:bld-testng:0.9.6-SNAPSHOT
bld.extensions=com.uwyn.rife2:bld-testng:0.9.6
bld.extension.jacoco=com.uwyn.rife2:bld-jacoco-report:0.9.5
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
bld.downloadLocation=

View file

@ -30,12 +30,13 @@ public class ExamplesBuild extends BaseProject {
version = version(0, 1, 0);
javaRelease = 17;
downloadSources = true;
autoDownloadPurge = true;
repositories = List.of(MAVEN_CENTRAL);
scope(test).include(dependency("org.testng", "testng", version(7, 9, 0)));
scope(test).include(dependency("org.testng", "testng", version(7, 10, 0)));
}
public static void main(String[] args) {

View file

@ -34,7 +34,7 @@ public class TestNgOperationBuild extends Project {
public TestNgOperationBuild() {
pkg = "rife.bld.extension";
name = "bld-testng";
version = version(0, 9, 6, "SNAPSHOT");
version = version(0, 9, 6);
javaRelease = 17;
downloadSources = true;
@ -47,7 +47,7 @@ public class TestNgOperationBuild extends Project {
.include(dependency("com.uwyn.rife2", "bld", version(1, 9, 0)));
scope(test)
.include(dependency("org.testng", "testng", version(7, 9, 0)))
.include(dependency("org.testng", "testng", version(7, 10, 0)))
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 2)))
.include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 10, 2)))
.include(dependency("org.assertj", "assertj-core", version(3, 25, 3)));

View file

@ -232,7 +232,8 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
}
/**
* Should TestNG consider failures in Data Providers as test failures.
* Should TestNG generate results on a per suite basis by creating a sub directory for each suite and dumping
* results into it.
*
* <p>Default is {@code false}</p>.
*
@ -345,6 +346,29 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
return this;
}
/**
* An implementation of {@code ListenerComparator} that will be used by TestNG to determine order of execution for
* listeners.
*
* @param listenerComparator the listener comparator
* @return this operation instance
*/
public TestNgOperation listenerComparator(String listenerComparator) {
options.put("-listenercomparator", listenerComparator);
return this;
}
/**
* The factory used to create TestNG listeners.
*
* @param listenerFactory the listener factory
* @return this operation instance
*/
public TestNgOperation listenerFactory(String listenerFactory) {
options.put("-listenerfactory", listenerFactory);
return this;
}
/**
* Set the Level of verbosity.
*
@ -429,6 +453,18 @@ public class TestNgOperation extends TestOperation<TestNgOperation, List<String>
return this;
}
/**
* Fully qualified class name that implements {@code org.testng.ITestObjectFactory} which can be used to create
* test class and listener instances.
*
* @param objectFactory the object factory
* @return this operation instance
*/
public TestNgOperation objectFactory(String objectFactory) {
options.put("-objectfactory", objectFactory);
return this;
}
/**
* The list of {@code .class} files or class names implementing {@code ITestRunnerFactory}.
*

View file

@ -17,7 +17,7 @@
package rife.bld.extension;
import org.junit.jupiter.api.Test;
import rife.bld.Project; // NOPMD
import rife.bld.Project;
import rife.bld.operations.exceptions.ExitStatusException;
import java.util.List;