Added support for new TestNG thread pool arguments

This commit is contained in:
Erik C. Thauvin 2024-01-28 17:53:40 -08:00
parent e26934ef67
commit c8fe28cda9

View file

@ -1,5 +1,5 @@
/*
* Copyright 2023 the original author or authors.
* Copyright 2023-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -561,6 +561,19 @@ public class TestNgOperation extends AbstractProcessOperation<TestNgOperation> {
return this;
}
/**
* Should TestNG use a global Shared ThreadPool (At suite level) for running data providers.
*
* @param shareThreadPoolForDataProviders {@code true} or {@code false}
* @return this operation instance
*/
public TestNgOperation shareThreadPoolForDataProviders(boolean shareThreadPoolForDataProviders) {
if (shareThreadPoolForDataProviders) {
options.put("-shareThreadPoolForDataProviders", String.valueOf(shareThreadPoolForDataProviders));
}
return this;
}
/**
* The directories where your javadoc annotated test sources are. This option is only necessary
* if you are using javadoc type annotations. (e.g. {@code "src/test"} or
@ -845,6 +858,19 @@ public class TestNgOperation extends AbstractProcessOperation<TestNgOperation> {
return this;
}
/**
* Should TestNG use a global Shared ThreadPool (At suite level) for running regular and data driven tests.
*
* @param useGlobalThreadPool {@code true} or {@code false}
* @return this operation instance
*/
public TestNgOperation useGlobalThreadPool(boolean useGlobalThreadPool) {
if (useGlobalThreadPool) {
options.put("-useGlobalThreadPool", String.valueOf(useGlobalThreadPool));
}
return this;
}
/**
* Set the Level of verbosity.
*
@ -921,4 +947,4 @@ public class TestNgOperation extends AbstractProcessOperation<TestNgOperation> {
*/
CONTINUE
}
}
}