I am new to Karate and I encounter this issue:
I have this feature class:
Feature: Validate myAPI
Background:
* def result = call read('classpath:generateBearerToken.feature')
* def token = result.bearerToken
* print "Token is : " + token
* configure headers = {Authorization: '#(token)'}
Scenario Outline: Validate POST
* configure headers = {Authorization: '#(token)'}
Now, when I print the token from background it comes as it should be but each time I try to run only a specific scenario the token comes as null.
If run the whole class, it works fine but the problem is only when I try to run from the scenario level.
Any help is appreciated!
Thank you!