Show TOC

Procedure documentationEditing a Test Script

 

When you have recorded a test script, you can edit and complete it:

  • You can edit components of a test script that was recorded with the Component-Based Test Automation (CBTA) tool in the Test Repository views. For more information, see Editing a CBTA Test Script.

  • You can edit steps (modules) from an eCATT test script or from a eCATT test script combined with third-party test tool steps. For more information, see Combining Test Script Steps from Different Tools inCreating a Test Script.

  • Restrictions:

    • If a test script was modified in eCATT, you can no longer edit it in the Test Repository views. To edit the test case, open the test configuration and choose Start eCATT.

    • If you use a third-party test tool, the Test Script tab page is not displayed in the editor for test configurations. The content of the test script can only be interpreted by the third-party tool, not by SAP Solution Manager.

Prerequisites

You have created a test configuration including a test script and maintained the test configuration attributes as described in Defining Test Configuration Attributes and Creating a Test Script.

Procedure

  1. In the Test Repository - Test Configuration view, select the test configuration that includes the test script you want to edit.

  2. Choose the Test Script tab.

    The test script steps are displayed. In an eCATT or composite test script, the steps can be test scripts of any test tool type.

  3. You can add test script steps, under Test Script Steps:

    • Enter the following data for an eCATT or composite test script:

      1. In the Type column, select the type of the test tool with which the test script was created.

      2. In the Name column, select the test script.

      3. In the Version column, enter the relevant version, which is 1, in most cases.

    Save your entries. Empty lines are removed automatically.

  4. To define the sequence of test script steps, use the Up and Down buttons.

    To duplicate several steps with a test script, you can use the copy and paste feature.

    To remove a superfluous step (for example, because you have performed it twice, by mistake) choose Remove.

  5. Configure parameters under Start of the navigation path Test Script Next navigation step Parameters End of the navigation path:

    • To define the values passed to the test script steps (import and export parameters), edit the Parameters sub tab page:

      1. In the Usage field, define the usage type:

        • No value: No parameter value is passed to the parameter of the test script. The test script parameter does not have a default value.

        • Fixed: A constant value is passed to the parameter. The constant value does not depend on the execution of the script.

          Example Example

          If you always want to create a sales order for 5 pumps, enter 5 for the parameter Quantity, in the Value column. If you set usage to Fixed but do not enter a value, the value NULL is used in the test script. To define an empty string value, use the value %BLANK%.

          End of the example.
        • Exposed: The parameter is mapped to the parameter of the parent script. The parameter value is passed from (import parameters) or passed to (export parameters) the parameter of the parent script.

          Import parameters can receive the values from the test data container.

          Several exposed import parameters can receive their values from the same parent script parameter.

          A single exposed export parameter can pass its value to several export parameters of the parent script.

          Example Example

          You want to create a main test script comprising 3 steps (scripts) with the following parameters:

          • Create quotation

            Import parameters: Customer, Material, Quantity

            Export parameter: Quotation Number.

          • Create sales order from quotation

            Import parameter: Quotation Number

            Export parameter: Sales Order Number

          • Create delivery from sales order

            Import parameter: Sales Order Number

            Export parameter: Delivery Number

          You put 3 of the steps in the sequence. To be able to execute the main script for a different customer, material and quantity, you have to know the delivery number created at the end. To do so, set the usage type to Exposed for the following parameters:

          • Import parameters Customer, Material, Quantity of the script “Create quotation”

          • Export parameter Delivery Number of the test script “Create delivery from sales order”

          End of the example.
        • Local: The value passed to the parameter is mapped into the parameter of another step. The value actually used during the execution of the test script depends on the execution of the parent script and the values created in the preceding steps.

          Example Example

          You want to pass the value of parameter Quotation Number created by the “Create Quotation” test script step to the “Create sales order from quotation” test script step. To do so, set the usage type to Local and map these 2 parameters between them. To do so, in the Reference Parameter column, assign the name of one parameter to the other.

          End of the example.
      2. Define the other columns as required.

    • To display SAP attributes of an eCATT test script or of a test script created with a third-party test tool, choose the Attributes sub tab page under Test Script.

      To change the attributes, under Test Script Steps, in the Name column, select the test script.

    • To display the description, if available, choose the Description sub tab page.

      For test scripts steps created with a third-party test tool, to select either the SAP description or the third-party test tool description, select the respective radio button.

    • To display the screen capture of a test script step, if available, choose the Image tab page.

    • To check where a test script is used, select the test script and choose Where-Used.

    • To edit or display a test script step in a new session, in the Name column, choose the test script.

      If the third-party tool in which the script was created is not available, you go to the eCATT wrapper test script.

  6. To execute the test, choose Execute.