Skip to content

Add possibility to set number of threads for parallel run #19

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

eugenenekh
Copy link
Contributor

To give user control of number of threads to use.
Default to 4.

To give user control of number of threads to use.
Default to 4.
pom.xml Outdated
<properties>
<property>
<name>dataproviderthreadcount</name>
<value>${thread.count}</value>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in TestNG there is an option called threadcount, so the name thread.count for other option is confusing.
http://testng.org/doc/documentation-main.html#running-testng

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any suggestions on naming? dataproviderthreadcount? threads?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are you sure that we should use dataproviderthreadcount not threadcount?
if so, we can say data.provider.thread.count

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pretty sure it is dataproviderthreadcount
https://cucumber.io/docs/guides/parallel-execution/#testng

The default thread count of the dataprovider in parallel mode is 10. To change this the dataproviderthreadcount property needs to be added to the configuration section of the Surefire or Failsafe plugin in the POM.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

year, but as I see we parallelized by classes, not by methods. I'm not sure, is this correct when we use dataproviderthreadcount option, does it take any effect?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way to limit threads in current version?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

threadcount? :)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope

<properties>
   <property>
       <name>threadcount</name>
       <value>${thread.count}</value>
   </property>
</properties>

does not work in our case

@eugenenekh eugenenekh requested a review from mialeska November 2, 2020 13:41
@eugenenekh
Copy link
Contributor Author

@mialeska, renamed parameter to data.provider.thread.count

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@eugenenekh eugenenekh merged commit daa7699 into master Mar 23, 2021
@eugenenekh eugenenekh deleted the add_possibility_to_set_number_of_threads_for_parallel_run branch March 23, 2021 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants