Learn how to generate test definitions for your test infrastructure in an auto-populated Excel sheet directly from Test Data embedded in Test Cases.
Created an Excel template according to the columns and rows you require. The following are the keywords which can be used in the Excel templates.
Test case keywords fill their value on the first step row of each test case, with the remaining step rows left blank - this suits templates where each test case is a block of step rows and the test-case-level columns (name, number, description) should appear once per block.
- _repeated variants fill the same value on every step row of the test case instead. Use these when each row must be self-contained - for example when the sheet will be filtered, sorted, or imported into a tool that reads one row at a time.
- _collapsed variants change the layout: the export renders one row per test case instead of one row per step. Step-level values (step names, descriptions, expected results, assigned variables) are joined together inside a single cell, one line per step. Don't mix collapsed and non-collapsed keywords in the same template region - they expand to different row counts, so adjacent columns would no longer line up.
Keyword | Description |
|---|---|
$[test_case_no] | Index number of the test case. |
$[test_case_no_repeated] | Index number of the test case - repeated for every step. |
$[test_case_name] | The original name of the test case. |
$[test_case_name_repeated] | The original name of the test case - repeated for every step. |
$[test_case_description] | The description of the test case. |
$[test_case_description_repeated] | The description of the test case - repeated for every step. |
$[test_case_step_no] | The index of the test step within the test case. |
$[test_case_step_name] | The test step name. |
$[test_case_step_name_last] | The name of the last test step in the test case. |
$[test_case_step_desc] | The test step description. |
$[test_case_step_desc_last] | The description of the last test step in the test case. |
$[test_case_step_expected_result] | The test step expected result. |
$[test_case_step_expected_result_last] | The expected result of the last test step in the test case. |
$[test_data_variable_names] | List of variables assigned within the test step. |
$[test_data_variable_values] | List of values assigned within the test step. |
$[test_data_variable_value][<variablename>] | A specific test data value, resolved at the test step. Replace <variablename> with the variable name. |
$[test_data_variable_final_value][<variablename>] | The final resolved value of a variable for the test case, taken from the generated test data - so generated values (random, dates, etc.) match the test's data sheet. Filled on the first step row only, like $[test_case_name]. Replace <variablename> with the variable name, or with the data-sheet column name (e.g. Create Customer_customerId) to pick a specific subflow instance. |
$[test_data_variable_final_value_repeated][<variablename>] | As $[test_data_variable_final_value], but repeated for every step. |
$[test_data_variable_assignments] | List of the assignment expressions as written on the test step's node (unresolved - the value at the point of assignment). |
$[test_data_variable_assignment][<variablename>] | A specific variable's assignment expression as written on the test step's node (unresolved). Replace <variablename> with the variable name. |
$[test_case_step_custom_field][<fieldname>] | The value of a custom field on the test step's node. Replace <fieldname> with the custom field name. |
$[model_custom_field][<fieldname>] | The value of a custom field on the model. Replace <fieldname> with the custom field name. |
$[test_case_no_collapsed] | Index number of the test case - one row per test case (steps collapsed). |
$[test_case_name_collapsed] | The original name of the test case - one row per test case (steps collapsed). |
$[test_case_step_no_collapsed] | The step indexes of the test case, joined in one cell - one row per test case. |
$[test_case_step_name_collapsed] | All test step names, joined in one cell - one row per test case. |
$[test_case_step_name_last_collapsed] | The name of the last test step - one row per test case. |
$[test_case_step_desc_collapsed] | All test step descriptions, joined in one cell - one row per test case. |
$[test_case_step_desc_last_collapsed] | The description of the last test step - one row per test case. |
$[test_case_step_expected_result_collapsed] | All test step expected results, joined in one cell - one row per test case. |
$[test_case_step_expected_result_last_collapsed] | The expected result of the last test step - one row per test case. |
$[test_data_variable_names_collapsed] | All variables assigned across the test case's steps, joined in one cell - one row per test case. |
$[test_data_variable_values_collapsed] | All values assigned across the test case's steps, joined in one cell - one row per test case. |
$[test_data_variable_value_collapsed][<variablename>] | A specific test data value - one row per test case. Replace <variablename> with the variable name. |
$[test_data_variable_assignments_collapsed] | All assignment expressions across the test case's steps (unresolved), joined in one cell - one row per test case. |
$[test_data_variable_assignment_collapsed][<variablename>] | A specific variable's assignment expression (unresolved) - one row per test case. Replace <variablename> with the variable name. |
$[test_case_step_custom_field_collapsed][<fieldname>] | The value of a custom field on the test step's node - one row per test case. Replace <fieldname> with the custom field name. |
$[model_custom_field_collapsed][<fieldname>] | The value of a custom field on the model - one row per test case. Replace <fieldname> with the custom field name. |
Register the Excel file
First off is to register the Excel sheet in Quality Modeller. To do so, along the left Dashboard menu, go to Workspace > Configuration and click the Code Templates tab.
Click the blue button New Template and in the New Code Template pop-up complete the info for Name, from the Type drop down menu select Excel.
Finally, browse to choose the original Excel file. Notice the new specified Code Template is listed at the bottom as most recently added, with three actions to either edit, delete or download.
Identify Test Steps
Only nodes indicated as Test Steps export to the Excel Code Template. To activate a waypoint as a Test Step, first select one on the model canvas, then in the Explorer pane on the right-click the i icon, then in Properties toggle to activate as a Test Step.
Note: Condition blocks may not be necessary to indicate as a Test Step, since their purpose on the canvas is more to indicate a choice along a path. Test Steps refer more to the outcomes of those decisions.
Give parameters to Descriptions and Expected Results for export
In the Properties pane, add Descriptions and Expected Results. In this example, a Description is given as: Enter a valid username '$[Username]' and Expected Result as:
'$[Username]' appears in the username field. These are the Test Data Variables specified to be injected. To do so, click the Insert Variable dropdown.
Generate, export and download the Data
Click Generate and then Export Test Suite, selecting Connector Profile as Excel Template and specify the Template as the one you originally created.
Open the downloaded file and see the Test Steps, along with ant other specified fields are populated including any Test Data Variables, with the Test Type and Status.