[英]How to get a response of the previous request with spring-cloud-contract
Let's say I have a scenario that consists of 3 steps: 假设我有一个包含3个步骤的方案:
The first step is quite straightforward, I just submit a request and verify response as it's described here 第一步是很简单,我只是提出请求,因为它描述的验证响应这里
The problem starts with step 2. In order to perform Update and Delete I need to know the ID of the item saved in the step 1. Is there any way with spring-cloud-contracts to extract it from step 1 response? 问题开始于步骤2。为了执行更新和删除,我需要知道步骤1中保存的项目的ID。spring-cloud-contracts是否可以从步骤1响应中提取出来?
Not really. 并不是的。 However it seems that you're misusing the tool. 但是,您似乎在滥用该工具。 You're trying to use Spring Cloud Contract for acceptance testing. 您正在尝试使用Spring Cloud Contract进行验收测试。 Why not just set fixed values and verify the semantics? 为什么不只是设置固定值并验证语义呢?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.