Scenario is comprised of a series of Actions as steps. As you already know, an action may have some parameters defined. Parameter is a place-holder data used in action logic without specifying a hard-coded value. If a Scenario is using an Action that has parameters, then the scenario must supply data for such parameters.
If you put together the data values for all the parameters belonging to all the steps in a Scenario, it makes one test case. You can write multiple test cases for a given scenario, where each test case covers a different combination of data values. When you run a scenario, it gets executed multiple times - once for each test case. For every execution, a different test case (data combination) is utilized.
Consider following example, where the Login action has 2 parameters - uname and password
You can create multiple test cases for this scenario, as below:
Test Case | uname | password |
Admin Login | admin | P#sddssd0 |
Account Holder Login | john.doe | x9S)(dscs |
Note: If none of the scenario steps/actions have any parameters, then you cannot explicitly create test cases. By default, the Scenario itself is labelled as the only test case.
It may also be possible that all the parameters required for the Scenario may have been overriden to be supplied through other static sources such as Global Properties or Run-Properties or hard-coded literals. In this case also, there is only one implicit Test Case. You do not have data-driven testing possibility.
If a test case is applicable for a Scenario, it can be created by
- Create a test case manually through test case modal
- Import test cases from an excel sheet
- Auto generate test cases through accelQ's in-built algorithm for optimal combination of various parameters.
Generating Test Cases
accelQ provides a powerful capability to auto-generate test cases to cover all possible permutations of input data, optimized for test case count.
If one or more of the parameters belonging to the scenario steps are defined to point to a data type or a data list, you have an ability to auto-generate test cases. accelQ produces mathematically optimized series of test cases to cover the permutations based on data type and data list definition.
Importing Test Cases
accelQ allows importing test cases from an excel spreadsheet.
- 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.
In case you are manually preparing the excel sheet, here are the formatting rules:
- First row is the header row with column names.
- First column name must be "Test Case Name". Value for this column must be unique, unless you choose to overwrite existing test cases.
- Each input parameter should be specified in a separate column.
- Metadata column names should be prefixed with "$MD."
- Tags can be specified with column name, "$MD.Tags". Multiple tags can be specified with ";" separation.
- If there are duplicates in parameter names across different steps of the Scenario, prefix the ambiguous column names with "$<step number>".
- Column names are not case sensitive.
- A maximum of 500 test cases can be imported in one shot.
- If a parameter is of type "Data Type", then any value which is not matching with any of the class names is considered to be a literal value.
- Metadata values should be specified in the following format, depending on the type of field:
- Date: mm/dd/yy format
- Boolean: True/Yes/1 to indicate 'true' value and all others to indicate 'false' value
- User Name: Should be specified as "<first name>,<last name>"
Comments
0 comments
Please sign in to leave a comment.