Bobcat ignoring thead.count in config.yaml
gmgandy opened this issue · 2 comments
Bobcat appears to be ignoring the thread.count configuration setting in config.yaml. Regardless of whatever value we pass in, it appears to always run 2 concurrent tests.
I'm using the following:
src\main\resources\config.yaml:
default:
properties:
proxy.enabled: false
thread.count: 1
contexts: [localChrome]
src\main\resources\contexts\localChrome.yaml:
localChrome:
webdriver.type: chrome
webdriver.cap.resolution: 1280x1024
Is there another property we should be setting instead to set the number of concurrent tests?
Quick addition, we are running our tests from Gradle rather than Maven. While we have been unable to set our thread count through the yaml.config, I have found that the tests task from the org.gradle.api.tasks.testing.Test plugin, we can set the number of parallel threads using the following:
test {
useJUnitPlatform()
systemProperties = System.getProperties()
systemProperty 'junit.jupiter.extensions.autodetection.enabled', 'true'
maxParallelForks = 1
}
Hi @gmgandy!
Thanks for pointing this out! That property was unfortunately left by mistake when we've switched to new config approach. Parallelising tests is the test runner's job, hence you are correctly using the maxParallelForks
property 👍.
Other way, although we have not tested it out extensively yet, could be using the JUnit's mechanism: https://junit.org/junit5/docs/current/user-guide/#writing-tests-parallel-execution
I've cleaned up the properties in the templates: wttech/bobcat-gradle-template@573f3a6