Retrieve a JWT from a feature A in a feature B

Viewed 21

I’m trying to retrieve a JWT from a feature A in a feature B.

For this I have in the feature A:

# create API access for the client
Given url baseUrl
And path 'admin', 'clients', clientApiId, 'accesses', 'api', 'api-key', 'renew'
And header Authorization = 'Bearer ' + authenticationJWT
When method put
Then status 200

* def clientApiJWT = response

And in feature B:

# Create a process with API access
* def clientApiAccess = call read('classpath:karate/common/create-client-api-access.feature')
* clientApiJWT = clientApiAccess.clientApiJWT

With this code I recover the following error:

enter image description here

Thank you for your help

1 Answers

Shouldn't it be:

* def clientApiJWT = clientApiAccess.clientApiJWT
Related