执行后,进入Tree视图,选择要检查的值对应的string,右键选择“Insert XML Check”
执行后,进入Tree视图,选择要关联的值对应的string,右键选择“Save value in parammeter”,如下图所示。
与http脚本参数化操作一致
检查点、关联(两种)加上后的脚本如下
Action() { web_service_call( "StepName=getSupportCity_101", "SOAPMethod=WeatherWebService|WeatherWebServiceSoap|getSupportCity", "ResponseParam=response", "Service=WeatherWebService", "ExpectedResponse=SoapResult", "Snapshot=t1556617084.inf", BEGIN_ARGUMENTS, "byProvinceName=湖北", END_ARGUMENTS, BEGIN_RESULT, "getSupportCityResult=SupportCity-HB", END_RESULT, LAST); lr_xml_extract("XML={response}", "FastQuery=/Envelope/Body/getSupportCityResponse/getSupportCityResult/string", "XMLFragmentParam=GetCity_XML", LAST); lr_xml_get_values("XML={response}", "FastQuery=/Envelope/Body/getSupportCityResponse/getSupportCityResult/string", "ValueParam=GetCity_Value", LAST); lr_xml_find("XML={response}", "FastQuery=/Envelope/Body/getSupportCityResponse/getSupportCityResult/string", "Value=武汉 (57494)", LAST); return 0; }