Karate 空手道-响应cookies不会自动传递到下一个请求
当我从不同的功能文件调用第一个请求时,第一个请求的响应cookie并没有传递给下一个请求 下面是我的代码:Karate 空手道-响应cookies不会自动传递到下一个请求,karate,Karate,当我从不同的功能文件调用第一个请求时,第一个请求的响应cookie并没有传递给下一个请求 下面是我的代码: ##First request## Given def createUserResponsePayload = call read('classpath:helper/bi/createBiAccount.feature@createBiUser') ## Second request## * def updateBIAccountNegativeRequestPayload =
##First request##
Given def createUserResponsePayload = call
read('classpath:helper/bi/createBiAccount.feature@createBiUser')
## Second request##
* def updateBIAccountNegativeRequestPayload = read('classpath:data/atg/payload/bi/updateBIAccount.json')
* set updateBIAccountNegativeRequestPayload.!gender = 'female'
Given path '/v1/bi/account'
When request updateBIAccountNegativeRequestPayload
When method PUT
Then status 200
目前我们正在使用下面的解决方案,@PeterThomas您能建议是否有更好的解决方案吗
And cookie JSESSIONID = createUserResponsePayload.responseCookies
这是意料之中的。传递变量和响应是您的责任 如果您使用“共享范围”,您可能不必这样做: