lr use soap protocol, to test the webservice interfaces

Based on a real project to test the WebService WSDL situation is not much, the best choice is not WebService WSDL testing. The main reason is because the WSDL document is too complex.

In the case of (WebService weather forecast service) in, WeatherWebService although only contains 5 interface, but its corresponding WSDL XML documents up to nearly 500 lines;

The actual project, the system under test often contain hundreds of WebService interfaces, its size WSDL document can be imagined.

Moreover, the information contained in the WSDL document is too full, most of the information for the WebService test is not necessary.

Although the use can clearly see all the interface functions after LoadRunner import WSDL, but every time the test selection interface is also a very troublesome thing in hundreds of interfaces.

Especially when WebService performance testing, often only need to select a few typical interface. Therefore, the replacement method is the use of "soap" agreement to carry out.

 

 

1, weather Interface:

Save the message to the local soap1.1 for: xxx.xml file format

 

2, the import lr:

 

 

3, Click ok, the script will automatically return to the page, and automatically generates the script has been seen: soap_request function

 

 

 4, in the above case can be modified for a particular string City:

 

 

5, and then open the log "Extended log" in the "Run-time Settings", select the "Parameter substitution" and "Data returned by server".

     After running the script, see "Replay Log" (seen at this time the result log interface running playback)

 

6, the result may be garbled or inconsistent results, Content-Type information packets from the beginning of the soap can be known, request packets and response packets are coded display is UTF-8. Thus the problem is not due to LoadRunner script is encoded in UTF-8 is not caused so that the script characters provided theCityName not recognized. LR urban Kanji script for transfer transcoding, script kanji character is about to be converted to the UTF-8 encoding format.

 

 

 

7、此时可见基本可实现成功调用 (注:过程中会遇到很多的问题,但是根据具体报错,慢慢找问题所在)

Guess you like

Origin www.cnblogs.com/QiKa/p/12079754.html