rajan manwansh
rajan manwansh

Reputation: 19

Scope of any element/object of a response json is within the scenario only

Scenario: Generenate jwt and check status Given path '/sdk/jwt'

header Authorization = call read('jwt.js') { token: 'e68c82a665847c', secret: 'f08f06f1f41f4479854c' }

When method get Then status 200 And def tkn = response Scenario: Get project meta info for an instance Given path '/meta/project' And header Authorization = JWT tkn #which the response of 1st scenario. When method get Then the is status 200

But tkn value is not coming in the second scenario.

Upvotes: 1

Views: 116

Answers (1)

NagaRaj
NagaRaj

Reputation: 85

Define in background, it will work as before test

Upvotes: 1

Related Questions