Test Case Parameters
Last updated
Last updated
In your testing process, Parameters allow you to capture variables that can be reused across multiple executions of the same Test Case. This eliminates the need to create separate test cases or duplicate steps for different conditions.
Consider a scenario where you need to test the sign-in functionality of a web application under various conditions. For each user, you’ll need to test each website twice under different conditions (VPN, WiFi, HTTPS, SSO, Cookies), both enabled and disabled.
Parameter 1
Parameter 2
Group 1 is a Secure network; Group 2 is an Insecure network.
Go to your repository, to select an existing test case, or create a new one.
When you either create or edit an existing test case, you can scroll down to find the "Parameters" section and simply click on the "+ Add Parameter' button.
Then, proceed to add the following test case steps
Check the network condition specified (Secure/ Insecure)
Launch the specified browser.
Navigate to the specified website.
Enter the login credentials for the specified site.
Click the "Sign In" button.
When a test case with Parameters is included in a test run, it generates multiple instances of the test case, each corresponding to a specific combination of parameter values.
For example:
Test 1: Browser = Chromium
, Website = https://www.qase.io
, Secure = VPN = Yes, WiFi = Yes, HTTPS = Yes, SSO = Yes, Cookies = Yes
Test 2: Browser = Chromium
, Website = https://blog.qase.io
, Secure = VPN = Yes, WiFi = Yes, HTTPS = Yes, SSO = Yes, Cookies = Yes
(and so on, until all combinations are covered)
Test 24: Browser = Microsoft Edge
, Website = https://help.qase.io
, Insecure = VPN = Yes, WiFi = Yes, HTTPS = Yes, SSO = Yes, Cookies = Yes
With single parameters, the total number of test cases is the product of the number of values for each parameter. For example, with two parameters having 3 and 4 values, you get (3*4) 12 test cases.
Given the network security conditions (Secured and Unsecured), it’s impractical to list each component as a separate parameter. Instead, all components are either enabled in a secured network or disabled in an unsecured network. This is where Parameter Groups become useful.
To further streamline the testing process, you can group related parameters into "Parameter Groups." For example:
Network security: Is on VPN, Is on WiFi, Is HTTPS, SSO sign-in, Cookies enabled
Account status: is Active; has a custom role; is a regular user, is Owner
Parameter Groups are useful when not all combinations of parameters are relevant or meaningful. For instance, with “Account Status” parameter, a combination of “not active” and “not Owner” might not exist in your system or be applicable.
In such cases, Parameter Groups help you focus only on practical and realistic combinations, eliminating unnecessary tests. This ensures that your testing is efficient and covers only meaningful scenarios.
In our example, although we initially had 12 combinations for the single parameters, each of these needs to be tested on both Secure and Insecure network groups. As a result, the total number of test cases in the run will now be 24.
In a test run, the total number of parameter combinations for a case cannot exceed 1,024.
In the Test Run dashboard, selecting a parameterized test case will display a ‘siblings’ tab. This tab shows copies of the test case for all other parameter values associated with the selected case.
Browser
Chromium
Firefox
Safari
Microsoft Edge
Website
qase.io
blog.qase.io
help.qase.io
is on VPN?
is on WiFi?
is HTTPS?
Using SSO?
Cookies Accepted?
Yes
Yes
Yes
Yes
Yes
No
No
No
No
No