问题描述
我需要将第一个Web服务的响应传递给下一个服务.我们为每个Web服务维护一个方案.首先服务中的某些标签需要传递到功能文件本身内的下一个Web服务.请帮忙.
I have a requirement to pass the response of first web services to next service. We maintain one scenario for each web services. Some of the tags in first services needs to be passed to next web services within the feature file itself. Please help.
谢谢,提雅古
推荐答案
我认为您从根本上误解了Scenario
的工作方式.每个Scenario
应该是独立的.您不能让一个Scenario
更新一个变量,然后期望其他变量可以看到更新后的值.请将您的流程"合并为一个Scenario
.或者,如果某些设置"步骤很常见,请使用Background
部分.
I think you have fundamentally misunderstood the way a Scenario
works. Each Scenario
is supposed to be independent. You can't have one Scenario
update a variable and then expect that other ones can see the updated value. Please combine your 'flows' into one Scenario
. Or if some 'setup' steps are common, use a Background
section.
请记住,您应该能够注释掉Scenario
或通过标记跳过某些内容,而不会影响其他任何内容.
Keep in mind that you should be able to comment-out a Scenario
or skip some via tags without impacting any others.
这篇关于在空手道中的场景之间传递数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!