SOAPUI Chinese Manual (eight)----functional test Case for Web services

Source: Internet
Author: User
Tags soapui

Now, let's take a look at the functional test in a testcase.

  1. Expand Simple TestSuite and double-click Simple Login and Logout W. Properties Steps .
  2. As you can see, TestCase includes five teststeps.
  3. You can also click the Description tab to see the test document.
  4. This step consists of three different types of teststeps; a Propertystep , testrequests and the Propertytransfer . What they have done:
    • Propertysteps:
      Store properties for later use. In our example, it is the user name and password required to log in.
    • testrequests:
      the actual request to the server. In this scenario, log on and log off.
    • Propertytransfers:
      a step used to move properties between different steps. This may be transferred from one property to a Request: Property Transfer:move Username and Password, or moved from the properties of the test request to another test request, like the attribute Transfer: Move SessionID the same.
  5. Double-click Property transfer:move Username and Password .
  6. the editor will now open on the SOAPUI desktop idea: This attribute transfer does make two transfers in two properties. First, it needs to do the transferuser transfer. It takes the properties Properties:username and Password and moves it and moves it to Test request:login. then it needs to do the transferpass transfer. It takes the property password from the above Properties:username and Password and moves to step Test request:login .
  7. an important feature of the SOAPUI test is that assertion. The assertion is the validation of the test request and the response we expect. Open Test Step Test request: Logoff.
  8. In the test steps, we have four assertions ;
    • SOAP response
      That is, the response is a SOAP response.
    • Architecture conforms to
      It conforms to the schema.
    • Not a SOAP fault
      That's not a SOAP fault.
    • XPath contest
      and some so-called XPath contests. the XPath in the match validates the expected value of an element.

Test Run

Now that we have checked the test case, let's run it! Press the play key and test run and test case progress bar should be full green.

It only turns red after one step?
Don't forget to start the mockservice.

Or... Do you run a step-by-step test earlier?
Then look at the reaction, and perhaps the answer is, have you already had a conversation?
we log in earlier and do not allow re-login, let's just go to Mockservice, stop and restart it, clear all server-side sessions. Now, rerun the test.

SOAPUI Chinese Manual (eight)----functional test Case for Web services

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: 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.