Create custom step type

Create a custom step type (configuration) that can form the basis of new steps.

Before you begin

Role required: [atf_test_admin] .

About this task

Out of the box, the Automated Test Framework includes specific types of steps such as Open Form, Set Value, Assert Value and so forth. With the Step Configurations module, you can create steps that perform actions you specify.

Procedure

  1. Navigate to Automated Test Framework > Administration > Step Configurations.
  2. Click New.
    The system displays the Test Step Config form.
  3. In the Name field, enter a name for your step type.
  4. (Optional) In the Category field, select the category to which you want to assign this step. Categories are used for filtering the step list in the Add Step dialog. For more information, see Category field example.
  5. (Optional) In the Batch Order Constraint field, choose one of the following values.
    • None: this step type can appear at any point in a test
    • Start Batch Execution: if this test includes a batch with this step, this step must be the first in the batch
    • Run in the middle of an execution: if a test includes a batch with this step, this step must appear after the first and before the last step of the batch.
    • Stop Execution: if a test includes a batch with this step, this step must be the last step in the batch.
  6. In the Order field, enter an integer specifying where steps with this configuration appear in the step list on the Add Test Step dialog. For more information, see the example using the Order field.
  7. In the Template reminder field, enter the instructions you want to appear when this step is included in a test as part of a template. For more information, see the example of using the Template reminder field.
  8. In the HTML description field, enter the text you want to appear when the cursor highlights this step on the Create New Step dialog. For more information, see the example using the HTML description field.

Note: You may find it convenient to skip the next two steps, both of which involve writing scripts, until after you have added any input and output variables.

  1. In the Description generation script field, add code to the provided template to generate the description assigned to a test step record when a step of this type is included in a test. For more information about writing this script, see Step description generation script. To see an example of where the system displays this description, see Description generation script example.
  2. In the Step Execution Script field, add code to the provided template to define the script that executes when a step of this type runs. The script template provides instructions and examples for working with step inputs, outputs, and step results. For more details on the step execution script, see Step execution scripts.
  3. Click Submit.
    The system creates a new test step type and returns to the list of test configurations.
  4. (Optional) To add input or output variables, re-open the step config record.
  5. (Optional) To add input variables to this step config, scroll to the Input Variables tab, then click New. Fill out the required fields for the new variable, then click Submit. Repeat until you have added all the input variables needed.
  6. (Optional) To control the order in which input variables appear on the New Step form, edit the values in the Order column for the Input Variables related list.
  7. To add output variables to this step config, scroll to the Output Variables tab, then click New. Fill out the required fields for the new variable, then click Submit. Repeat until you have added all the output variables needed.