Can't start multiple drivers in multiple threads

134 views Asked by At

Steps To Reproduce

  1. Login to Baidu
  2. Search something
  3. Set thread-count = 5 Expected behavior Each thread should initial one driver. For example, i have 3 cases, should start 3 drivers.

Actual behavior All the thread use the same one driver (it means only start 1 driver). For this, if the case has many steps, it seems not support multiple threads due to the only one drier.

scenario image

testNG file image

test data image

java script image

2

There are 2 answers

2
user861594 On

This is possible duplicate of how-to-run-test-cases-in-parallel and qaf-weird-behavior-for-parallel-testing

For data driven tests, set global.datadriven.parallel=true and set thread count in xml configuration file using data-provider-thread-count

1
yan On

I have configured as you mentioned, but it will only run one case and ignore others. But if I set global.datadriven.parallel=false, it will run correctly. enter image description here

enter image description here

enter image description here enter image description here