Thank you for your feedback.
Form temporarily unavailable. Please try again or contact to submit your comments.

Step description generation script

Log in to subscribe to topics and get notified when content changes.

Step description generation script

In a step configuration record, the step description generation script field determines the step description that the system generates when a step of this type is added to a test.

For an example showing how where the description generated by this script appears, see Description generation script example.


The step parameter to generateDescription() gives the script access to the step object, which it turn gives access to the input variables as defined in the step configuration record. (Input variables are defined in a related list.)

For example, if – in a step config record – the inputs related list contains two records: var1 and var2, the script can reference var1 with the expression step.inputs.var1 and can reference var2 with step.inputs.var2.

Example: Record Query description generation script

    (function generateDescription(step) {
    var td = GlideTableDescriptor.get(step.inputs.table);
    if (!td) {
         gs.log("Invalid table name in test step: " + step.inputs.table);
         return gs.getMessage("Set field values");
    var descriptionGenerator = new ATFStepDescriptionGenerator();
    var description = gs.getMessage("There should be at least one record in '{0}' matching " +
                      "a query of\n{1}",
                      descriptionGenerator.getConditionDescription(step.inputs.table, step.inputs.field_values)]);
    return description;