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
Steps to perform Automation Test for Web Services using SOAPUI
Step 1: Go to File and click on New Soap Project
Step 2: Enter Project Name(We can enter any name of our choice)
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.
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.
Step 5: Double click on Request1 will load the script.
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.
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.

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

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

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

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

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.

Similarly we can create more than one test case by adding different values in the Request.
Step 2: We can give any name for this test suite but by default it is TestSuite1 and click OK.
Step 3: Enter test case name(any) and click OK.
Step 4: Then will open POP UP "Add Request to Test Case". Click OK.
Step 5: Test case will be created as shown below and click on green arrow to tun this test case.
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.
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.
Step 3: Click on "XPATH match" and then click on "Add" button.
Step 4: Declare XPath Expression which we want to validate and provide the Expected Result in the box.
Step 6: Click on Save button and run the script by clicking on green arrow as shown on the top
Once we run the script we can result at the bottom with validation passed or failed.
No comments:
Post a Comment