Availability: Version 4.0
When you write a Scenario, you can parameterize the test data and expected values in a step, which you use for data entry and verification. You can then data-drive the same steps in a Scenario with multiple sets of data values.
For example, consider a Scenario to verify login functionality with a given user name and password. If you parameterize the username and password values (rather than providing hard coded values), you can then verify this same functionality with different combinations of username/password such as Admin user, Retail user, Corporate user etc.
What is a Test Case
Parameterization brings the concept of data-driven testing to accelQ Scenarios. Each unique combination of data values with which you want to test a Scenario becomes a Test Case for that Scenario. In other words, for one Scenario you write, you can create multiple test cases, where each test case consists of different combination of data values for parameters.
Example 1 / Scenario: Verify login functionality on QBank
Test Cases:
- Verify Admin login
- Verify retail customer login
- Verify corporate customer login
Example 2/ Scenario: Verify Flight Search on Travelocity
Test Cases:
- Flight Search with Domestic origin and Domestic destination
- Flight Search with Domestic origin and International destination
- Flight Search with International Destination on Business class
- Flight Search with multiple airports at destination
- Flight Search for next day travel
- more...
Specifying Parameters in test steps
In the step description or expected result, insert parameter names with double angle brackets as displayed in the example here. Replace the hard coded data values with such formatted parameter names. If the same parameter needs to be referenced elsewhere in the Scenario, be sure to use the same parameter name.
The moment you add at least one parameter for a Scenario, Test Cases tab generates an alert indicating a Test Case need to be now added to the Scenario.
Naming a Parameter
Parameter name in accelQ is case-insensitive and space-insensitive. In other words, lower case and upper case letters are not distinguished and space characters are ignored while determining the name of a parameter.
For example,
- <<User Name>> is same as <<user name>> (case insensitive)
- <<User Na me>> is same as <<UserName>> (space insensitive)
- <<User Name>> is same as <<username>> (case and space insensitive)
While naming a parameter, you can only use alphabets, numeric digits, spaces and underscore ("_") characters. Make sure to use functionally meaningful names for parameters.
Note: Same name Parameter used in multiple steps in a Scenario refer to same Parameter. If you intend to provide different values for the parameter in different steps, provide a different name for the Parameter in each step.
Add Test Cases
If a Scenario includes at least one parameter, you need to create test cases where you will provide values for the parameters.
Navigate to Test Cases tab and click "+" icon to add a test case. In the resulting modal, provide appropriate values for the parameters.
Importing test cases from Excel sheet
You can import multiple test cases in bulk, from an excel sheet. accelQ support xls and xlsx formats for test case import.
- In the test cases tab for the scenario, click on Import Test Cases icon.
- Click on the link to download a template spread sheet.
- Update the template with necessary data rows. Browse for the file and import into the scenario.
- If there are multiple test cases with same name, you have an option to either give an error or just overwrite the previous test case values.
Parameter Reconciliation
For a Scenario with parameters, you create multiple test cases to cover various data combinations. This test data is an important asset to manage properly over the changes that may come up in the Scenario steps in future.
When you change the parameters for an existing Scenario with test cases, accelQ allows reconciling and re-mapping existing data with the new parameters in the Scenario. This is an important capability as it allows you to reuse the existing test data for the Scenario.
As you change Scenario steps, you may have renamed an existing parameter or functionally brought in new parameters that map to some of the existing ones.
Whenever you save changes to an existing Scenario, accelQ automatically detects changes to parameterization and brings up a reconciliation window. In this window, map existing data to one of the new parameters in the Scenario. If any of the existing data parameters are not mapped to one of the new parameter, test case data will be deleted for that parameter.
Best Practices: Parameterization is a great tool to optimize testing effort
Properly planned parameterization is a great tool to promote reusability and to optimize testing effort. It is probably the single biggest contributor for better long term maintainability of test cases and ease of adaptability to evolving AUT functionality. It avoids a lot of duplication in development and maintenance efforts. With proper parameterization, most of the maintenance effort is focused on the test steps, so the overall effort is drastically reduced.
accelQ strongly recommends Parameter based approach to test case creation. It also leads to easier transition and mapping to automation efforts. To make the process sustainable, accelQ brings powerful and robust use cases built around this concept.
- Ability to maintain the sanity of test data during initial creation and changes to test steps.
- Centralized data type definition.
- Data lists to restrict parameter values.
- Automated test case generation.
- Test case level filters in test suite definition.
- Ability to track "Test Case" as a separate entity from "Scenario".
Comments
0 comments
Please sign in to leave a comment.