Reputation: 614
I am trying to implement a beforeStep
execution hook.
It has been successfuly with
Results result = Runner
.path("/Users/FindStoryByID.feature")
.hook(new KarateExecutionHockExample()).parallel(1);
How to achieve such feat if we want to use the parallel execution like below? I cannot seem to chain the .hook
with Runner.parallel
Results results = Runner.parallel(getClass(), 20);
Thanks a lot!
Upvotes: 2
Views: 920
Reputation: 58128
The number / argument to parallel()
(the last method on the builder) is the number of parallel threads.
Results results = Runner.path(path).hook(new MandatoryTagHook()).parallel(10);
Here is an example: https://github.com/intuit/karate/commit/8a41ff51801f66e563346e3a182a2e57cae8f977
Upvotes: 1