banner



How To Use Soapui For Web Services Testing

All IT Courses 50% Off

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.

https://docs.mendix.com/howto6/attachments/18448632/18580339.png

Step 3: Run the project and go to http://localhost:8080/ws-doc/.

https://docs.mendix.com/howto6/attachments/18448632/18580314.png

Stride 4: Enter the URL of WSDL in the field of Initial WSDL. The field Project Name will automatically get filled.

https://docs.mendix.com/howto6/attachments/18448632/18580334.png

Step 5: Click on, OK. It will and so create a new project.

https://docs.mendix.com/howto6/attachments/18448632/18580313.png

Build a Test Suite, Test Case, and Examination Step:

Step i: Press Ctrl + T to create a new test suite.

https://docs.mendix.com/howto6/attachments/18448632/18580332.png

Stride 2: Click on, OK. Select the proper name of your Test Suite and printing Ctrl + N to create a new Test Case.

https://docs.mendix.com/howto6/attachments/18448632/18580331.png

Step 3: Click on, OK. Expand the Examination Suite and Examination Case. Correct-click on the Test Step > Add together Step > SOAP Request.

https://docs.mendix.com/howto6/attachments/18448632/18580312.png

Step four: Enter the proper noun of the pace and click on, OK.

https://docs.mendix.com/howto6/attachments/18448632/18580329.png

Stride v: Select the pick CustomerWebserviceSoap -> GetCustomers and click on OK.

https://docs.mendix.com/howto6/attachments/18448632/18580328.png

Stride 6: Once again, click, OK.

https://docs.mendix.com/howto6/attachments/18448632/18580327.png

Footstep 7: Open up the SOAP request Recollect Customers.

https://docs.mendix.com/howto6/attachments/18448632/18580326.png

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

https://docs.mendix.com/howto6/attachments/18448632/18580307.png

Footstep 2: Click on the icon Add together Assertion.

https://docs.mendix.com/howto6/attachments/18448632/18580324.png

Stride 3: Click Property Content > XPath Match. Enter the expression count(//Client) and click on Save.

https://docs.mendix.com/howto6/attachments/18448632/18580323.png

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.

https://docs.mendix.com/howto6/attachments/18448632/18580322.png

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.

https://docs.mendix.com/howto6/attachments/18448632/18580320.png

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.

https://docs.mendix.com/howto6/attachments/18448632/18580310.png

Click on the icon Run this Test Case.

https://docs.mendix.com/howto6/attachments/18448632/18580309.png

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

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel