top of page

Scale up Tests to Cover 100s of Combinations with Test Parameterization

What is Parameterized Testing?

Parameterization allows you to define a single test that will run multiple times using different value combinations. When a single test can operate with different input values, it’s like having one versatile test scenario that transforms into dozens, hundreds, or even thousands of variations. This is the magic of parameterization—defining one test case but feeding it multiple data sets to make sure the behaviour remains consistent for each of the given value combinations.


Why Parameterize?

  1. Increased Coverage: Parameterizing enables verifying that the system under test (SUT) behaves as intended not just for one set of values, but for a large range of combinations, increasing the coverage of the range of scenarios tested.

  2. Easier test maintenance: Without parameterization, you would have to create copies of the same test, and change the values of certain fields to fit different scenarios. With parameterization, you de-couple the test logic with the input values, allowing to have a single concise test that is easier to maintain - the system behaviour changed? Just need to update a single test compared to 100s of different tests if not parameterized.

  3. Reduced test creation time: parameterization removes the need to define multiple copies of the same test and updating each test with specific parameter values. This results in writing just 1 test compared to 100s of different tests.


Parameterized Testing with TestChimp

Any test created in TestChimp can be parameterized easily by simply uploading a csv file containing the value combinations.


A single row in the .csv file represents a single test execution, and each column represents a variable that can be referenced in the test - whose value will be the value of that column in the current row.


Below is an example of such a CSV:


ProductId

Quantity

CouponCode

PaymentMethod

1HTYK

1

SAVE10

Credit Card

4DG1

4


PayPal

3XGB

3

NEWUSER

Credit Card


Now, in the test, you can refer to each of the parameterized values as you would refer any variable - with {{ }} notation. For instance, if one of your requests need to send the ProductId, you can specify {{ProductId}} as the value for the field in the request configuration, and during each parameterized run, the value will be populated based on the row being executed.


Below is a quick video demo of how to use parameters in your tests:




bottom of page