Now, let's take a look at the functional test in a testcase.
- Expand Simple TestSuite and double-click Simple Login and Logout W. Properties Steps .
- As you can see, TestCase includes five teststeps.
- You can also click the Description tab to see the test document.
- 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.
- Double-click Property transfer:move Username and Password .
- 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 .
- 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.
- 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