Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Parallel Execution in Automated Testing Using Testsigma

DZone's Guide to

Parallel Execution in Automated Testing Using Testsigma

Learn three simple steps to execute parallel application testing using the Testsigma tool in this tutorial.

· DevOps Zone ·
Free Resource

Read why times series is the fastest growing database category.

Introduction to Automated Testing - Parallel Execution

When compared to Manual Testing, one of the main advantages of Automated Testing is the reduction in Execution time. This is just one among the merits of Automated Testing and there are many more. In today’s vast and volatile software market, a software product needs to be thoroughly tested before deployment since one small issue may catapult the potential customer away from your product to a competitor's product.

One more thing to take care of is that though maximum Test coverage is intended, it shouldn’t become a hindrance to faster Product release cycle. An efficient way to minimize the Test Execution time without hurting Maximum Test Coverage is Parallelisation of Automated Tests.

It is a no-brainer that Parallel Execution of Test Cases will bring the Execution time considerably down and adds value to the process of Software Deployment. However, setting up your multiple systems for Parallel Execution involves a lot of configurations. If you are short of the hardware and are planning to run the tests on Cloud-based device farms such as Saucelabs or BrowserStack, that adds another layer of complexity.

There are only a few tools in the market which takes care of all these configurational complexities and provide a simple interface for the user and Testsigma is one among them. We will discuss the Parallel Execution of Automated Tests for our already created Test Cases in Testsigma in this article.

Automated Testing With Parallel Execution in 3 steps

For Parallel Test Execution in Testsigma, we need to perform the following steps:

  1. Create a set of Test Cases and add some Test Steps inside it.
  2. Create multiple Test Suites add the previously created Test Cases to it.
  3. Create an Execution and create separate Execution Environments for each of the Test Suites that needs to run in parallel.

1. Create a Set of Test Cases

If you are not familiar with creating Test Cases in Testsigma, please check out our previous DZone article - Web Application Automated Testing With Testsigma to gain some insight into the process of creating and executing a simple Test Case in Testsigma.

Once the Test Cases are created and a few Test Steps are added to it, you can move onto creating Test Suites to group the Test Cases.

2. Create Multiple Test Suites

Test Suites are used to group a set of Test Cases for Execution. While creating the Test Suites, we will add the previously created Test Cases as required. It is important to note that Test Cases in a single Test Suite always runs sequentially. If you need to run two Test Cases in parallel, you need to add them to two separate Test Suites.

To create a Test Suite, you can navigate to the Test Suites page by going through:

Applications > Select Application > Select Version > Test Suites

1. Click on Create button on the top right corner to create a Test Suite.

Parallel_Execution-Automated_Testing-Testsigma1

2. Enter the Test Suite Name, Description, Prerequisite and then click on Click here to Select Test Cases.

3. Choose Test Cases page opens up. Click on the down-arrow beside the Requirement name to expand the list of Test Cases.

Parallel_Execution-Automated_Testing-Testsigma2

4. Select the Checkbox beside the Test Cases that you want to select and click Done button.

Parallel_Execution-Automated_Testing-Testsigma3

5. We will be taken back to the Create Test Suite page once again. Click on Create button to create the Test Suite. We would get a success notification for Test Suite creation and the page redirects to Test Suites page.

Similarly, repeat the above steps(Steps 1-5) to create multiple Test Suites that you want to run in parallel.

Grouping of Test Cases for Parallel Execution

Some of you might be still confused how to group the Test Cases in various Test Suites for Parallel Execution. Let us discuss that in detail.

Let us consider I have a total of 30 Test Cases consisting of 3 logical groups each containing 10 Test Cases and I would like to execute those 3 groups in parallel. Imagine those 3 logical groups are for Smoke, Sanity and Acceptance Testing.

In this case, I simply need to create a Test Suite for each of those groups i.e 3 Test Suites in total. These Test Suites can now be run in parallel execution sessions.

Next, we will create an Execution inside which we can create an Execution Configuration for each of those Test Suites. When the Execution is run, these 3 Execution Configurations will run in parallel and each of them will run the Test Suite inside it.

Therefore we can summarise that 3 Test Suites are created for each of the 3 logical groups - Smoke, Sanity, and Acceptance that are supposed to run in Parallel. These 3 Test Suites are added to 3 separate Execution Environments created inside a single Execution and when the Execution runs, those 3 Execution Environments will execute those 3 Test Suites in parallel.

Parallel_Execution-Automated_Testing-Testsigma6

We will discuss the creation of an Execution Configuration in the next section.

Now we can move onto the final step i.e. creating an Execution and adding Parallel Execution Environments to it. We need to create an Execution Environment for each of those recently created Test Suites to execute them in parallel.

3. Create an Execution and Add Parallel Execution Environments

To create an Execution, you can navigate to the Executions page by going through:

Applications > Select Application > Select Version > Executions

1. Click on the Create button in the top right corner to create an Execution. Create Execution page would open up as shown below:

Parallel_Execution-Automated_Testing-Testsigma4

2. Enter the required details such as Execution Name, Execution Model e.t.c. We will select the Execution Model as Testsigma Lab for this example.

3. Click on Create Execution Configuration to open the Create Execution Configuration page. In this page, we can specify the Operating System and Browser settings.

Note: Going forward in this article, we will be referring 'Execution Environment' as 'Execution Configuration.'

Parallel_Execution-Automated_Testing-Testsigma5

4. After entering the required details, select the Test Suite/Suites to be included in the Execution Configuration and click on the Create button.

5. We need to repeat the above steps(Steps 3 & 4) to create more Execution Configurations and we can add the Test Suites to each of those Configurations.

6. Once all the required Test Suites are added to Execution Configurations, you can click on the Create button to create the Execution.

6. Go to the Executions page and click on Run Now button to execute the Tests now or schedule it for later.

Viewing Results

Once the Test starts running, wait for some time and click Refresh. Depending on the number and complexity of Steps it will take some time to complete. On an average, a test of 5 steps will be complete in less than 30 seconds.

After the Execution is completed, click on Run Results on left navigation pane to go to the Run Results page.

Click on the Execution name(for example, Parallel Testing Execution) in Run Results page and you will be taken to the Run Results page for that Execution.

Image title

You can click on the Run ID under the Execution Result and on the next page, click on Test Case name under the Test Case Results to see a step by step overview of the Test Result.

Please check Testsigma Knowledge Base. If your query persists, feel free to contact us at support@testsigma.com.

Welcome to the era of #SmartTestAutomation!

Learn how to get 20x more performance than Elastic by moving to a Time Series database.

Topics:
parallel testing ,parallel execution ,automated testing ,web application testing ,devops

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}