Added script to list parameters

This commit is contained in:
Erik C. Thauvin 2024-05-27 16:22:32 -07:00
parent 6020dde8eb
commit b0cf0f5035
Signed by: erik
GPG key ID: 776702A6A2DA330E
3 changed files with 20 additions and 9 deletions

1
.gitignore vendored
View file

@ -55,3 +55,4 @@ atlassian-ide-plugin.xml
.idea/httpRequests
local.properties
test-output

10
cliargs.sh Executable file
View file

@ -0,0 +1,10 @@
#!/bin/bash
MAIN="org.testng.TestNG"
TMP=/tmp/cliargs
java -cp "lib/test/*" $MAIN >$TMP 2>/dev/null
cat $TMP | grep "^ -.*" | sed -e "s/ -/-/" -e "s/^-/\"-/" -e "s/$/\",/" -e "s/, -/\",\n\"-/" | sed "/testRunFactory/d" | sort | sed '$s/,//'
rm -rf $TMP

View file

@ -47,8 +47,9 @@ class TestNgOperationTest {
}
@Test
void testCheckAll() {
void testCheckAllParameters() {
var params = List.of(
"-alwaysrunlisteners",
"-configfailurepolicy",
"-d",
"-dataproviderthreadcount",
@ -63,7 +64,6 @@ class TestNgOperationTest {
"-listenercomparator",
"-listenerfactory",
"-log",
"-verbose",
"-methods",
"-methodselectors",
"-mixed",
@ -85,18 +85,19 @@ class TestNgOperationTest {
"-threadpoolfactoryclass",
"-usedefaultlisteners",
"-useGlobalThreadPool",
"-xmlpathinjar",
"-alwaysrunlisteners"
"-verbose",
"-xmlpathinjar"
);
var args = new TestNgOperation()
.fromProject(new BaseProjectBlueprint(new File("examples"), "com.example", "Examples"))
.failurePolicy(TestNgOperation.FailurePolicy.SKIP)
.directory("dir")
.alwaysRunListeners(true)
.dataProviderThreadCount(1)
.dependencyInjectorFactory("injectorfactory")
.directory("dir")
.excludeGroups("group")
.failWhenEverythingSkipped(true)
.failurePolicy(TestNgOperation.FailurePolicy.SKIP)
.generateResultsPerSuite(true)
.groups("group1", "group2")
.ignoreMissedTestName(true)
@ -105,9 +106,8 @@ class TestNgOperationTest {
.listenerComparator("comparator")
.listenerFactory("factory")
.log(1)
.verbose(1)
.methods("methods")
.methodSelectors("selector")
.methods("methods")
.mixed(true)
.objectFactory("objectFactory")
.overrideIncludedMethods("method")
@ -127,8 +127,8 @@ class TestNgOperationTest {
.threadPoolFactoryClass("poolClass")
.useDefaultListeners(true)
.useGlobalThreadPool(true)
.verbose(1)
.xmlPathInJar("jarPath")
.alwaysRunListeners(true)
.executeConstructProcessCommandList();
for (var p : params) {