How To Use Soapui For Web Services Testing

Using SOAP UI, automated tests can exist created for spider web services and Exam Web Service using Lather UI.
In this article, nosotros will
- Create a Soap project using Soap UI
- Create Assertions in SOAP UI
- Build an automated test using Soap UI
Start, yous need to install Lather UI from the URL https://www.soapui.org/downloads/soapui.html.
Create a SOAP project:
Step 1: Open Soap UI.
Step 2: Press Ctrl + N to create a new project.
Step 3: Run the project and go to http://localhost:8080/ws-doc/.
Stride 4: Enter the URL of WSDL in the field of Initial WSDL. The field Project Name will automatically get filled.
Step 5: Click on, OK. It will and so create a new project.
Build a Test Suite, Test Case, and Examination Step:
Step i: Press Ctrl + T to create a new test suite.
Stride 2: Click on, OK. Select the proper name of your Test Suite and printing Ctrl + N to create a new Test Case.
Step 3: Click on, OK. Expand the Examination Suite and Examination Case. Correct-click on the Test Step > Add together Step > SOAP Request.
Step four: Enter the proper noun of the pace and click on, OK.
Stride v: Select the pick CustomerWebserviceSoap -> GetCustomers and click on OK.
Stride 6: Once again, click, OK.
Footstep 7: Open up the SOAP request Recollect Customers.
Step eight: Change the value from
<Commencement>?</Offset>
<PageSize>?</PageSize>
To
<Outset>0</Offset>
<PageSize>10</PageSize>
Step 9: Press Alt + Enter to submit the request. The response volition be:
<soap:Envelope xmlns:xsd="https://www.w3.org/2001/XMLSchema" xmlns:xsi="https://www.w3.org/2001/XMLSchema-instance" xmlns:soap="https://schemas.xmlsoap.org/soap/envelope/" xmlns:tns="https://www.instance.com/"> <soap:Body> <tns:GetCustomersResponse> <Customer> <Name>Jessica D. Rogers</Proper noun> <Address>2118 Collins Street</Address> <ZipCode>PA 16646</ZipCode> <Urban center>Hastings</City> </Customer> <Customer> <Name>Jamie S. Wentz</Proper noun> <Address>3269 Village View Bulldoze</Address> <ZipCode>Md 20872</ZipCode> <Metropolis>Damascus</Urban center> </Customer> <Client> <Name>Blake G. Race</Name> <Accost>4437 Sunny Glen Lane</Address> <ZipCode>OH 44115</ZipCode> <Urban center>Cleveland</City> </Customer> <Client> <Name>Angela 50. Dolly</Name> <Address>3718 Alpha Avenue</Address> <ZipCode>TX 75439</ZipCode> <City>Ector</City> </Client> </tns:GetCustomersResponse> </soap:Body> </soap:Envelope>
Create Assertions:
Step i: Click Assertions (one).
Footstep 2: Click on the icon Add together Assertion.
Stride 3: Click Property Content > XPath Match. Enter the expression count(//Client) and click on Save.
Extend your Test Instance:
Stride 1: Add together a new Soap Request to the already available exam cases.
Field | Value |
Specify proper noun for step | Create Customer |
Select operation to invoke for request | CustomerWebServiceSoap -> CreateCustomer |
Step 2: Modify the request.
<soapenv:Envelope xmlns:soapenv="https://schemas.xmlsoap.org/soap/envelope/" xmlns:exam="https://www.example.com/"> <soapenv:Header/> <soapenv:Body> <test:CreateCustomer> <Name>Donald A. Hylton</Name> <Address>784 Better Street</Address> <Metropolis>Kansas Metropolis</City> <ZipCode>KS 66102</ZipCode> </exam:CreateCustomer> </soapenv:Body> </soapenv:Envelope>
Step 3: Add a Contains Assertion and enter truthful.
Pace 4: Right-click on the test case, Retrieve Customers. Select the option Clone Test Step. Alter the Examination Step name to Retrieve Customers 2 and click on OK.
Footstep v: Open Exam Step Retrieve Customers two. Click on Assertions (2). Open up XPath Match – Unknown. Change the Expected Result to 1+ and click on button Save.
Run the Test Instance:
Open up Test Case TestCase 1.
Click on the icon Run this Test Case.
How To Use Soapui For Web Services Testing,
Source: https://www.h2kinfosys.com/blog/how-to-test-web-service-using-soap-ui/
Posted by: collinsarither.blogspot.com
0 Response to "How To Use Soapui For Web Services Testing"
Post a Comment