5.Summary of Automation Test using SOAPUI

SUMMARY:

  • SOAPUI is open source functional testing tool for SOA(Service Oriented Architecture) and Web Service Testing.
  • Using SOAPUI, we can perform Functional, Regression and Load testing.
  • SOAPUI works on XML where we can send the Request through XML and get the Server Response.
  • Using SOAPUI its very easy to create different test suits  and test cases with different data and use them to perform web services test.
Download and Install SOAPUI tool, once it is installed it will look like
soap1

Steps to perform Automation Test for Web Services using SOAPUI

Step 1: Go to File and click on New Soap Project

soap2

Step 2: Enter Project Name(We can enter any name of our choice)
soap3

Step 3: Enter Initial WSDL url--http://www.webservicex.net/CurrencyConverter.asmx?wsdl and Click OK.

             WSDL is nothing but end point url which should be provided to test web services.
soap4

Step 4: Once we Click Ok we will see a new Project has been created in the Left Side, this project is to convert the Currency of one country to another country.

soap5

Step 5: Double click on Request1 will load the script.

soap6

step 6: Now Request is ready and Now have to see the Response after adding the value to the Request and Trigger it.

Step 7: Now we will test this service by adding FromCurrency as USD and ToCurrency as INR and Trigger the Request.
soap7

Now we can see the Response here that Currency has been converted and fetched in the Response.So we can conclude that this web service works and similarly we test this web service by changing the Request.

CREATION OF DIFFERENT TEST CASES WITH DIFFERENT VALUES:

Step 1: Click on (+) logo to add test case.

soap8

Step 2: We can give any name for this test suite but by default it is TestSuite1 and click OK.

soap9

Step 3: Enter test case name(any) and click OK.

soap10

Step 4: Then will open POP UP  "Add Request to Test Case". Click OK.

soap11

Step 5: Test case will be created as shown below and click on green arrow to tun this test case.

soap12

Step 6: Once the test gets completed, If test is passed we can see it in green in color otherwise red in color if test fails.

soap13

Similarly we can create more than one test case by adding different values in the Request.

HOW TO ADD AND VALIDATE ASSERTION IN TEST CASES:

Step 1: Double click on Conversion-Request1 which is on the left pane.

Step 2: Click on "Adds an assertion to this item" icon shown on the top.

soap14

Step 3: Click on "XPATH match" and then click on "Add" button.

soap15

Step 4: Declare XPath Expression which we want to validate and provide the Expected Result in the box.

soap16

Step 6: Click on Save button and run the script by clicking on green arrow as shown on the top

soap17

Once we run the script we can result at the bottom with validation passed or failed.

soap18

No comments:

Post a Comment