LR supports two methods to test WebService in WebService virtual user protocol. One is to add service call, and the other is to import soap.
To import soap, you must import the defined XML request file.
After obtaining XML data returned by WebService, you can use XPath to verify the data. lr provides several functions to process XML:
Lr_xml_get_values () // retrieves values of XML elements found by a query
Lr_xml_set_values () // sets the values of XML elements found by a query
Lr_xml_extract () // extracts XML string fragments from an XML string
Lr_xml_delete () // deletes fragments from an XML string
Lr_xml_replace () // replaces fragments of an XML string
Lr_xml_insert () // inserts a new XML fragment into an XML string
Lr_xml_find () // verifies that XML values are returned by a query
Lr_xml_transform () // applies Extensible Stylesheet Language (XSL) transformation to XML data
In fact, there is another way to test WebService using LR, that is, using the HTTP protocol, because WebService is built on the HTTP protocol, therefore, web_custom_request in Web virtual user protocol can be used to construct WebService requests.
When learning lr to test WebService, if there is no ready-made WebService, you can use the wsdl of the parasoft website to test it:
Http://soatest.parasoft.com/store-01.wsdl
Refer:
Http://blog.testsautomation.com/2009/07/web-services-testing-in-loadrunner/
Http://blog.testsautomation.com/2009/05/validating-web-service-response-with-xpath/
Http://blog.testsautomation.com/2009/01/web-services-performance-using-loadrunner/