SoapUI is the Swiss-Army knife of automated Functional and Regression Testing. Powerful and innovative features help you validate and improve the quality of your services and applications. Best of all, you don’t have to be a developer to write Functional Tests in SoapUI. So whether you’re creating new TestSuites, adding TestCases, or adding assertions to your TestCases, it’s all amazingly simple and easy.
In this tutorial, let’s see how to add a request to the test suite and a test case and run the request from within the test suite.
Before starting this tutorial, create a new project using a WSDL in SOAPUI as discussed in the previous tutorials.
** Update – Complete SoapUi Tutorials now available here
Follow the steps below to run the request using a test suite.
Step 1: In the project created click on the request name as shown in the image below.
Step 2: Click on (Add request to test case) icon as shown in the image above in the request window.
Step 3: Create TestSuite window appears as shown below.
Step 4: Enter a test suite name of your choice and click on OK.
Step 5: Enter user defined test case name in the Create TestCase window as shown in the image below and click on OK.
Step 6: In the Add request to test case enter a user defined name and click on OK.
Step 7: Thus the request is successfully added to the testcase in a testsuite as shown in the image below.
Follow the steps below to add assertion to a request.
Step 1: Click on the icon (Add assertion to the request) as shown below to add an assertion in your request window.
Step 2: This will display Add Assertion window as shown below.
As you can see in the above image, there are various types of assertions that can be added to validate your response.
The various types of assertions are discussed in detail in types of assertions tutorial. Let’s add SLA assertion for the request in this tutorial using the step by step procedure mentioned below.
Step 3: Click on SLA assertion and select Response SLA option to validate the response time for the request sent.
Step 4: Thus SLA assertion is added successfully as shown in the image below. To see the assertions, available for a request click Assertions tab at the bottom of the request window.
Note: Before running the request for SLA assertion, set the response time limit for the assertion by double clicking on the assertion as shown in the image below.
RUN a Request:
Note: There are many ways of running a request.
In this tutorial, we will see
How to run the request directly?
How to run at testcase level?
Run the request directly:
Step 1: Now that an assertion is added, you can validate your response using the assertion by running the request directly clicking on RUN.
Assertion – FAILED:
Run the request at TestCase level:
Step 1: Click on the TestCase name to open the testcase window and click on RUN to run the testcase request as shown below.