Collections:
SOAP Request Failed in SOAP Test Case
What will happen if a SOAP request failed in a test case?
✍: FYIcenter.com
When the SOAP server failed to process a SOAP request,
it should return a SOAP Fault message as shown below.
1. Open NDFD-soapui.xml project in SoapUI.
2. Double-click on "SOAP Request Error" you added in the last tutorial. You see a sample SOAP request message.
3. Review the request message and change the "zipCodeList" value to be "xxxxx".
4. Click "Run" icon to test the request. You see the request status changing to red, indicating the request failed.
5. Review the response message. You see the following SOAP Fault message.
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <SOAP-ENV:Fault> <faultcode xsi:type="xsd:string">SERVER</faultcode> <faultactor xsi:type="xsd:string"/> <faultstring xsi:type="xsd:string">Error with one or more zip codes:</faultstring> <detail xsi:type="xsd:string"> <error>Error: Zip code "xxxxx" is not a valid US zip code</error> </detail> </SOAP-ENV:Fault> </SOAP-ENV:Body> </SOAP-ENV:Envelope>
6. Click "Assertions" tab below the request window. You see 2 assertions: 1 is VALID and 1 is FAILED.
SOAP Response - VALID Not SOAP Fault - Failed -> Response is a SOAP Fault
7. Run the test case again. You see the test case status changing to red, indicating at least 1 test step failed.
The picture below shows you what happens when SOAP Request Failed in SOAP Test Case:
Â
⇒ Testing REST API with SoapUI
⇠Clone SOAP Request in SOAP Test Case
⇑ Testing SOAP Web Service with SoapUI
⇑⇑ SoapUI Tutorials
2018-03-31, 1408👍, 0💬
Popular Posts:
How to generate IPv6 Addresses? To help you to obtain some IPv6 addresses for testing purpose, FYIce...
How to generate email addresses? To help you to obtain some email addresses for testing purpose, FYI...
Here is a list of top popular Software Test Management Commercial and Free Tools: RankNameVendorPric...
How to generate passwords? To help you to obtain some good passwords for testing purpose, FYIcenter....
How to generate ISBN numbers? To help you to obtain some ISBN numbers for testing purpose, FYIcenter...