Is karate-configure.js processed each time a request is made?

Viewed 109

I understand that karate-configure.js is processed for each scenario or each example under scenario outlines. However, I found one interesting thing. In my karate-configure.js, I am generating UUID

enter image description here

and this traceId is being retrieved and set in Background under a feature file.

enter image description here

I have a scenario where I am sending two requests, one for post followed by delete. I realized that although the first request takes the header set in Background but the second request doesn't. So I added a line for header before sending second request:

enter image description here

To my surprise(although this is desirable), I found out that traceId in second request wasn't the same as the one used by previous request. Does that mean karate-configure.js was processed before sending the second request, even though both are part of one scenario.

1 Answers
Related