Add output variables to scripted steps

  • Release version: Xanadu
  • Updated August 1, 2024
  • 2 minutes to read
  • Execute the following steps to add additional outputs in Run Server Side Script and Custom Scripted StepConfig test steps.

    Adding outputs in Run Server Side Script test step

    Modify the test scripts of Run Server Side Script test step to create additional outputs of your choice.

    Before you begin

    Role required: admin or atf_test_admin

    Procedure

    1. Navigate to All > Automated Test Framework (ATF) > Administration > Step Configurations.
    2. Search and select Run Server Side Script.
      The read-only Test Step Config form shows up.
      Note:
      Although the form is read-only, new output variables can be created.
    3. Scroll down to the Output Variables related list.
      The list of default output variables shows up.
    4. Click New to create a new output variable.
      Field Input Value
      Type Type of output variable
      Application Scope of the user
      Label User-facing name of the output variable
      Column name Variable name used in the script
      Max length Length of the data type.
      Note:
      This field doesn't show up for all data types.
      Gif showing creating new output variables
      The new output variable gets added to the Output Variable related list.
    5. Navigate to Automated Test Framework (ATF) > Tests.
    6. Select the test where you want to implement the new output variable.
    7. Click Add Test Step.
    8. Search and select Run Server Side Script test step.
    9. Follow the instructions to change outputs mentioned in the Test script.
      outputs.<column_name> = "<desired value>";
    10. Click Submit.
      The newly created output variables are now ready to be used in any subsequent steps of the test.

    Adding outputs in Custom Scripted StepConfig test step

    Copy the Custom Scripted StepConfig test step and customize the copied version by adding additional outputs.

    Before you begin

    Role required: admin or atf_test_admin

    Procedure

    1. Navigate to All > Automated Test Framework (ATF) > Administration > Step Configurations.
    2. Search and select Custom Scripted StepConfig.
      The read-only Test Step Config form shows up.
      Note:
      Since the form is read-only, you must copy the test step to customize it to add more output variables.
    3. Select Copy to have a copied version of the test step.
      Note:
      The copied version is no longer read-only.
    4. Add additional output variables in the copied version by implementing the following steps:
      1. Select New under Output Variables related list.
      2. Modify Step execution script to add more output variables.
      See Adding outputs in Run Server Side Script test step to add more output variables.
      Note:
      You can use these steps to customize the test step only in the copied version.
    5. Reuse the copied version of the test step in any test whenever required.
      Gif showing reusing of Custom Scripted StepConfig test step