【发布时间】:2021-04-07 15:52:37
【问题描述】:
当我从不同的功能文件调用第一个请求时,第一个请求的响应 cookie 没有传递给下一个请求 以下是我的代码:
##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
【问题讨论】:
标签: karate