1

I am using the parallel runner to run one of m feature files. It has 8 scenarios as of now. I wanted to integrate a third party reporting plugin (Extent report) to build out the reports. I planned to use the ExecutionHook interface to try and achieve this. Below are the issues i faced and havent found a even after looking at the documentation.

My issues

  1. I am creating a new test on the afterFeature method. This gives me 2 handles, Feature and ExecutionContext. However since the tests are running in parallel, the reporting steps are getting mixed on each other? How do i handle this? Any out of the box method i can use?
  2. To counter the above, i decided to build the whole report towards the end on the afterAll overridden method but here i am missing the execution context data so i cant use the context.getRequestBuilder() to get the urls and paths.

Any help would be great.

Jitendra Singh
  • 191
  • 1
  • 8

1 Answers1

1

Please focus on the 1.0 release: https://github.com/intuit/karate/wiki/1.0-upgrade-guide

Reasons:

  • it gives you a way to build the whole report at the end, and the Results object can iterate over all ScenarioResult instances
  • ExecutionHook has been changed to RuntimeHook, see example
  • yes, since tests can run in parallel, it is up to you to synchronize as the framework has to be high performance, but building reports at the end using the Results object is recommended instead of using the RuntimeHook
Peter Thomas
  • 54,465
  • 21
  • 84
  • 248