Compare commits
No commits in common. "6020dde8eb7abf00463b1b2dbb57fa298115b002" and "a5ce6ab0ecfcff591e144a6b45126fb78e5fc3c7" have entirely different histories.
6020dde8eb
...
a5ce6ab0ec
2 changed files with 1 additions and 101 deletions
|
@ -51,7 +51,7 @@ public class TestNgOperationBuild extends Project {
|
||||||
.include(dependency("org.testng", "testng", version(7, 10, 2)))
|
.include(dependency("org.testng", "testng", version(7, 10, 2)))
|
||||||
.include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 10, 2)))
|
.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.junit.platform", "junit-platform-console-standalone", version(1, 10, 2)))
|
||||||
.include(dependency("org.assertj", "assertj-core", version(3, 26, 0)));
|
.include(dependency("org.assertj", "assertj-core", version(3, 25, 3)));
|
||||||
|
|
||||||
javadocOperation()
|
javadocOperation()
|
||||||
.javadocOptions()
|
.javadocOptions()
|
||||||
|
|
|
@ -18,10 +18,8 @@ package rife.bld.extension;
|
||||||
|
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import rife.bld.Project;
|
import rife.bld.Project;
|
||||||
import rife.bld.blueprints.BaseProjectBlueprint;
|
|
||||||
import rife.bld.operations.exceptions.ExitStatusException;
|
import rife.bld.operations.exceptions.ExitStatusException;
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.*;
|
import static org.assertj.core.api.Assertions.*;
|
||||||
|
@ -46,104 +44,6 @@ class TestNgOperationTest {
|
||||||
assertThat(op.options.get("-alwaysrunlisteners")).isEqualTo("true");
|
assertThat(op.options.get("-alwaysrunlisteners")).isEqualTo("true");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
void testCheckAll() {
|
|
||||||
var params = List.of(
|
|
||||||
"-configfailurepolicy",
|
|
||||||
"-d",
|
|
||||||
"-dataproviderthreadcount",
|
|
||||||
"-dependencyinjectorfactory",
|
|
||||||
"-excludegroups",
|
|
||||||
"-failwheneverythingskipped",
|
|
||||||
"-generateResultsPerSuite",
|
|
||||||
"-groups",
|
|
||||||
"-ignoreMissedTestNames",
|
|
||||||
"-includeAllDataDrivenTestsWhenSkipping",
|
|
||||||
"-listener",
|
|
||||||
"-listenercomparator",
|
|
||||||
"-listenerfactory",
|
|
||||||
"-log",
|
|
||||||
"-verbose",
|
|
||||||
"-methods",
|
|
||||||
"-methodselectors",
|
|
||||||
"-mixed",
|
|
||||||
"-objectfactory",
|
|
||||||
"-overrideincludedmethods",
|
|
||||||
"-parallel",
|
|
||||||
"-propagateDataProviderFailureAsTestFailure",
|
|
||||||
"-reporter",
|
|
||||||
"-shareThreadPoolForDataProviders",
|
|
||||||
"-spilistenerstoskip",
|
|
||||||
"-suitename",
|
|
||||||
"-suitethreadpoolsize",
|
|
||||||
"-testclass",
|
|
||||||
"-testjar",
|
|
||||||
"-testname",
|
|
||||||
"-testnames",
|
|
||||||
"-testrunfactory",
|
|
||||||
"-threadcount",
|
|
||||||
"-threadpoolfactoryclass",
|
|
||||||
"-usedefaultlisteners",
|
|
||||||
"-useGlobalThreadPool",
|
|
||||||
"-xmlpathinjar",
|
|
||||||
"-alwaysrunlisteners"
|
|
||||||
);
|
|
||||||
|
|
||||||
var args = new TestNgOperation()
|
|
||||||
.fromProject(new BaseProjectBlueprint(new File("examples"), "com.example", "Examples"))
|
|
||||||
.failurePolicy(TestNgOperation.FailurePolicy.SKIP)
|
|
||||||
.directory("dir")
|
|
||||||
.dataProviderThreadCount(1)
|
|
||||||
.dependencyInjectorFactory("injectorfactory")
|
|
||||||
.excludeGroups("group")
|
|
||||||
.failWhenEverythingSkipped(true)
|
|
||||||
.generateResultsPerSuite(true)
|
|
||||||
.groups("group1", "group2")
|
|
||||||
.ignoreMissedTestName(true)
|
|
||||||
.includeAllDataDrivenTestsWhenSkipping(true)
|
|
||||||
.listener("listener")
|
|
||||||
.listenerComparator("comparator")
|
|
||||||
.listenerFactory("factory")
|
|
||||||
.log(1)
|
|
||||||
.verbose(1)
|
|
||||||
.methods("methods")
|
|
||||||
.methodSelectors("selector")
|
|
||||||
.mixed(true)
|
|
||||||
.objectFactory("objectFactory")
|
|
||||||
.overrideIncludedMethods("method")
|
|
||||||
.parallel(TestNgOperation.Parallel.TESTS)
|
|
||||||
.propagateDataProviderFailureAsTestFailure(true)
|
|
||||||
.reporter("reporter")
|
|
||||||
.shareThreadPoolForDataProviders(true)
|
|
||||||
.spiListenersToSkip("listenter")
|
|
||||||
.suiteName("name")
|
|
||||||
.suiteThreadPoolSize(1)
|
|
||||||
.testClass("class")
|
|
||||||
.testJar("jar")
|
|
||||||
.testName("name")
|
|
||||||
.testNames("names")
|
|
||||||
.testRunFactory("runFactory")
|
|
||||||
.threadCount(1)
|
|
||||||
.threadPoolFactoryClass("poolClass")
|
|
||||||
.useDefaultListeners(true)
|
|
||||||
.useGlobalThreadPool(true)
|
|
||||||
.xmlPathInJar("jarPath")
|
|
||||||
.alwaysRunListeners(true)
|
|
||||||
.executeConstructProcessCommandList();
|
|
||||||
|
|
||||||
for (var p : params) {
|
|
||||||
var found = false;
|
|
||||||
for (var a : args) {
|
|
||||||
if (a.startsWith(p)) {
|
|
||||||
found = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
assertThat(found).as(p + " not found.").isTrue();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void testClass() {
|
void testClass() {
|
||||||
var op = new TestNgOperation().testClass(FOO, BAR);
|
var op = new TestNgOperation().testClass(FOO, BAR);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue