Pages Navigation Menu

Coding is much easier than you think

SOAP UI – CREATE and RUN TestSuites

 

Before we create testsuites in SOAPUI, let’€™s see some of the key terms involved in structuring the tests in a functional testing.

SoapUI structures functional tests into three levels.

 

  • A TestSuite is a collection of TestCases that can be used for grouping functional tests into logical units. Any number of TestSuites can be created inside a soapUI project to support massive testing scenarios.
  • A TestCase is a collection of TestSteps that are assembled to test some specific aspect of your service(s). You can add any number of TestCases to a containing TestSuite and even modularize them to call each other for complex testing scenarios.
  • TestSteps are the “building blocks” of functional tests in soapUI. They are added to a TestCase and used control the flow of execution and validate the functionality of the service(s) to be tested.

Let’€™s see how to create and run test suites for a project in SOAPUI using the steps given below.

TestSuites can be added/created to a project in 2 ways.

  • TestSuites can be created from a project level.
  • TestSuites can be generated for a binding in a project.

Let’€™s see both the ways one by one.

CREATE TestSuites from project level:

Note: This can be done in 3 ways as shown in steps below.

Step 1:

Method 1:

Right click on a project name and select New TestSuite or press Ctrl + T as shown in the image below.

proj level_right click on proj

 

Method 2:

  • You can also create a testsuite by double clicking on Project name and choose testsuites tab as shown in the image below.

 

proj level_double click on proj

 

  • Click on icon icon(Create a new TestSuite in this project) to add a new test suite.

 

Step 2: In the New TestSuite window, enter a testsuite of your choice and Click OK as shown below.

 

new testsuite

new testsuite_testsuite name

Thus testsuite is created successfully as shown below.

Method 3:

Step 1: TestSuites can be added in a project when creating a new project in SOAPUI by checking the option Create a testsuite for the imported WSDL or WADL and Click OK as shown in the image below.

Create testsuite

Step 2: Generate TestSuite window appears as shown in the image below.

Generate testsuite dialog

Step 3: Enter a name for the testsuite generated and click OK.

Testsuite name

Thus testsuite is created successfully as shown below with the testsuite window.

Testsuite created

Testsuite Window:

TestSuite editor

GENERATE TESTSUITE USING A BINDING:

Step 1: Right Click on the binding name and select Generate TestSuite option from the drop down menu as shown in the image below.

Generate testsuite for Binding

 

Step 2: Generate TestSuite window appears as shown in the image below.

Generate Testsuite dialog_2

 

Step 3: Enter a name for the testsuite generated and click OK.

TestSuite name _2

 

Thus testsuite is created successfully as shown below with the testsuite window.

Testsuite created_2

Testsuite window:

TestSuite created_2

 

RUN A REQUEST IN A TESTSUITE:

So far, you have seen how to create test suites using the above methods. Now, let’€™s see how to run a request in a testsuite using the steps below.

Step 1: Double click on the TestSuite name in the navigator pane to open the testsuite editor.

TestSuite editor_2

There are 3 different ways of running testcases in TestSuites.

  • Run selected testcases in a sequence
  • Run selected testcases in parallel

Run selected testcases in a sequence:

To run testcases in a sequence click on Run testcases in sequence icon and click on Run testsuiteRun in the testcase editor as shown in the image below.

Run testcases in Sequence

 

Run testcases in sequence_2

Run selected testcases in parallel:

To run testcases in parallel, click on Run testcases in parallel icon and click onRun testsuite Run in the testcase editor as shown in the image below.

Run testcases in parallel

 

Thus requests are run in test suites successfully.