[testng-dev] Maven surefire plugin can’t set -suitethreadpoolsize parameter for parallel suites execution.

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[testng-dev] Maven surefire plugin can’t set -suitethreadpoolsize parameter for parallel suites execution.

Michael Braiman

Currently latest surefire plugin (version 2.16) is using deprecated TestNG configure (Map) method in which Map argument is converted to CommandLineArgs. Unfortunately the suitethreadpoolsize parameter is missing and   CommandLineArgs.SUITE_THREAD_POOL_SIZE is not set and not executed.

--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

[testng-dev] Re: Maven surefire plugin can’t set -suitethreadpoolsize parameter for parallel suites execution.

Michael Braiman

The following fragment of code placed in org.testng.TestNG.java in method configure(Map  cmdLineArgs) will resolve this issue:

Integer suiteThreadPoolSize = (Integer) cmdLineArgs.get(CommandLineArgs.SUITE_THREAD_POOL_SIZE); 
if (null != suiteThreadPoolSize) {
      result.suiteThreadPoolSize = suiteThreadPoolSize;
}

On Monday, 18 November 2013 22:26:56 UTC-5, Michael Braiman wrote:

Currently latest surefire plugin (version 2.16) is using deprecated TestNG configure (Map) method in which Map argument is converted to CommandLineArgs. Unfortunately the suitethreadpoolsize parameter is missing and   CommandLineArgs.SUITE_THREAD_POOL_SIZE is not set and not executed.

--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/groups/opt_out.
Reply | Threaded
Open this post in threaded view
|

[testng-dev] Re: Maven surefire plugin can’t set -suitethreadpoolsize parameter for parallel suites execution.

Michael Braiman
Here is a more accurate and tested code fragment:

    Object  suiteThreadPoolSize = cmdLineArgs.get(CommandLineArgs.SUITE_THREAD_POOL_SIZE);
    if (null != suiteThreadPoolSize) {
        if (suiteThreadPoolSize instanceof String){
            result.suiteThreadPoolSize=Integer.parseInt((String) suiteThreadPoolSize);
        }
        if (suiteThreadPoolSize instanceof Integer){
            result.suiteThreadPoolSize=(Integer) suiteThreadPoolSize;
        }
    }



--
You received this message because you are subscribed to the Google Groups "testng-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-dev.
For more options, visit https://groups.google.com/groups/opt_out.