I have multiple scenarios in one feature file in my project. One of the feature file creates tokens. I want to call this feature only once at the start of the test and then use the tokens in the other feature without executing the token feature again and again.
Cached response increments the number of hits in the server when we use that access token in another API hit
* def obtainToken = callonce read('AuthToken.feature')
* print obtainToken.response.accessToken
This worked when I used it in the background in various scenarios and authtoken API was sent only once.
But when I use this token in various APIs to get a response, Auth Token API incremented. (And header X-OAUTH2-Token = obtainToken.response.accessToken)
What should I do to avoid that increment?