Qtp tests the WebService Interface and implements functional testing (detailed steps)

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.