start portlet menu bar

HCLSoftware: Fueling the Digital+ Economy

Display portlet menu
end portlet menu bar
Select Page

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
Secure DevOps | October 26, 2023
Driving Precision with HCLTech Advantage TCart Powered by HCL OneTest for Oracle Cloud Applications
HCLTech Advantage TCart is an Oracle Cloud Applications regression toolkit built using our automated software testing tool, HCL OneTest. It automates test scripts, reduces test execution efforts by 78%, and offers ready-to-use built-in test scripts.
Secure DevOps | October 19, 2023
HCL AppScan SCA Team Finds Success with HCL OneTest Performance
Learn how HCL AppScan SCA team uses HCL OneTest Performance to monitor performance, run automated regression suites, and detect environment defects early.
Secure DevOps | October 17, 2023
What’s New with HCL OneTest v10.5.4
Come check out what’s new with our automated software testing tool, HCL OneTest v10.5.4 and learn how we can improve your DevOps lifecyle.