Scenario: Verify that Authentication is done or not
Given url '***********'
Given path 'authenticate'
And form field username = 'admin_cs'
And form field password = '********'
When method post
Then status 200
And header tokenn = response.token
* def accessToken = response.token
* print accessToken
Scenario: Verify Get all Clients
Given url '************'
Given path 'users/usersAssignable'
* header x-auth-token = accessToken
When method get
Then status 200
* def response = response
* print response
答案 0 :(得分:0)
请将两个Scenario
-合并为一个。或将第一个移到Background
中。请仔细阅读以下内容:https://github.com/intuit/karate#script-structure