SOAP - 解析变量从groovy到soap请求
问题描述:
我是新来的SOAP,需要帮助:)我有一个SOAP请求,我想运行五次,我需要传递变量从for循环在groovy中请求。SOAP - 解析变量从groovy到soap请求
实施例:
为(I = 1;我< 5; i ++在)
另一个问题{
与变量i
通过SOAP请求} :有什么办法,如何组合变量?我有一个属性有一些数据,我需要通过我的变量 例合并这样的数据:
$ {ADRESS#城市+ 变量i}
感谢响应。
答
假设my_prop是你传递给您的SOAP请求
for (index=1;index<5;index++)
{
// set the index value in the property
testRunner.testCase.setPropertyValue(my_prop, index.toString())
// run your SOAP request
testRunner.runTestStepByName("my_soap_test_step")
}
你的第二个问题的价值,你可以做
new_prop = context.expand('${#TestCase#old_prop}') + index.toString()
你尝试过这么远吗? –