One of the major challenges with distribution testing is data-driven tests. All tests that are running simultaneously should be able to access the data.

In a few scenarios however, you cannot allow more than one test to access the same data. With data sets offered by HCL OneTest UI (HOT UI), you now have an easier way of tackling this challenge while running distributed tests.

The following terms are used in this post:

  • Data sets provide tests with variable data during a run which can be created from scratch or by importing data from a comma-separated-value (CSV) file. For details, see Dataset overview.
  • Compound tests help you organize smaller tests into scenarios that can then be run end-to-end. When you run a compound test, each test added to it is invoked in the sequence defined. For details, see Compound tests.

Creating Data sets

Let’s consider a scenario that typically happens in an e-Commerce website. A user logs in, adds products to the cart, and places an order.  Thus, the following steps make a case for automated tests:

  • login: logging in to the e-Commerce website
  • add to cart: selecting and adding products to the cart
  • place order: placing an order after confirming the product details

To accelerate testing, you plan to run all the three tests on all the supported browsers in parallel. The application however would not allow for three simultaneous sessions with same user login. Therefore, each run should use a different combination of user ID and password whereas for testing the “place order” step, you can choose the same or different product name.

For the scenario described above, create the following datasets in HCL HOTUI with the required row data:

  • DS_Login: stores user login details under two columns – user id, password
  • Dataset- DS_Login


  1. Dataset- DS_Login

— DS_Product: stores product details under three columns – product name, id, seller

Dataset- DS_Product


  1. Dataset- DS_Product

Associate DS_Login dataset with the login test and associate input values in the test with the dataset columns. Similarly, associate DS_Product dataset with the addToCart test and associate input values with the respective dataset columns. For details, see Associating a test value with a dataset column.

Creating Compound Tests

To run all the three tests together as a scenario, create a compound test called TC_PlaceOrder in HCL OneTest and add the three tests in the expected order of execution. Insert a loop within the compound test and move the addToCart test into it. This is required to fetch the values (in this case, the product details) from the rows of a corresponding dataset during execution.


Compound Test


  1. Compound Test

When you run the compound test called TC_PlaceOrder, the login test runs first to log in to the application and then the addToCart test adds products to the cart. The number of products added to the cart is equal to the iteration count specified in the loop. Lastly, the placeOrder test places an order for the products added to the cart.

Distributing Tests

To execute the test scenario on multiple browsers simultaneously, create an AFT test suite called Distribute_TC_PlaceOrder.


AFT Test suite


  1. AFT Test suite

When you run the AFT test suite called Distribute_TC_PlaceOrder, the TC_PlaceOrder test runs in Chrome and Firefox in parallel, but tests that are part of the compound test TC_PlaceOrder run sequentially.

At each step of execution in different browsers, the login test fetches the required login details from the different rows of the DS_Login dataset. This way, single user login session is ensured for each parallel test run.  After the login test is complete, the addToCart test runs in a loop (for the specified number of times) and simultaneously on different browsers. Each execution of the addToCart test accesses the DS_Productdataset, as if it is a single test accessing the dataset and adds products to the cart.

In summary, HOTUI facilitates parallel test execution by enabling simultaneous access to data while restricting it, wherever needed.

Learn how you can accelerate testing at reduced costs.

Comment wrap
Further Reading
HCL Software | April 22, 2022
HCL named a Leader in the 2022 IDC MarketScape for Worldwide Enterprise Automated Software Quality and Continuous Testing for Digital Execution
HCL is thrilled to announce that we have been positioned as a Leader in the IDC MarketScape for Worldwide Enterprise Automated Software Quality and Continuous Testing for Digital Execution 2022 Vendor Assessment. This is a major recognition for HCL Software.
Secure DevOps | March 1, 2022
Use a Secondary Request Generator to Effectively Simulate Application Behaviour regarding Static Resources
HCL OneTest Performance provides an out-of-box solution to ease the task of setting up secondary requests apportioned with the requisite number of assets that need to be pulled down. Read the blog to know more.
Secure DevOps | February 25, 2022
Understand Response Time Statistics for Pages in HCL OneTest Performance Testing 
Read this blog to know more about how HCL OneTest Performance meets the end goal of browser fidelity and collecting a response time metric.
Filters result by