问题
I have observed that when I am running my tests (feature files) in maven build with Runner.parallel(getClass(), 1); it is working fine but when I am increasing number of thread like Runner.parallel(getClass(), 5); it start failing because it is executing all scenarios in parallel which is available in feature file. Scenarios are dependent on each other which are failing because which scenario need to execute in last executing in first.
Please suggest me some option which run all feature file in parallel but not run scenarios in parallel which available in feature file.
回答1:
https://github.com/intuit/karate#parallelfalse
If you use @parallel=false
on each feature where scenarios cannot be played in parallel, it'll work. But scenarios should be played in any order and not be dependent on each other. Maybe what you call scenarios shouldn't be split in the first place?
More information about script structure : https://github.com/intuit/karate#script-structure
来源:https://stackoverflow.com/questions/54538060/karate-parallel-execution-failing