I searched the internet for a long time to use qtp to test the WebService interface, but I did not find a systematic explanation. After my own experiments, I tested the WebService interface function. Now I will summarize it.
1. First install the WebService plug-in under qtp. For details, see wizard.
2. Go to the WebService recording page (the company's interface, so we can mask the inconvenient method)
(1) Next by default, enter the URL on the next page,
(2) continue next, go to the interface method selection page, and add the method to be tested,
(3) continue next. All the way down until the end.
(4) view the script code
XML check points are inserted by default. You can also insert XML check points by yourself through the menu.
3. parameterized checkpoint
The inserted XML checkpoint initializes the expected results, that is, parameterization.
(1) In the keyword view, click "value" of the checkpoint, and a small check sign is displayed. Click to enter.
(2) Go to the XML checkpoint page, select the value of the node to be checked, and check the value to check
(3) parameterization: parameterize the expected value of the value to be checked, click the selected value, and click a blank space on the right. The "#" Number shown in is displayed, click to enter the parameter settings.
(4) Enhance the script. You can edit the script based on your testing needs.
Now the WebService script recording and editing are complete.