Show TOC

Procedure documentationEditing a CBTA 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.

A CBTA test script consists of two types of components:

  • Default components are delivered by SAP with the CBTA software. They are stored in the SAP Solution Manager repository for eCATT test scripts. They perform single standard actions, for example, entering a value in a field, pressing a button, or selecting a tab page.

  • Screen components are generated after the recording of a test, depending on the screens that were used in the recorded process step. The inspection process retrieves static information on the screen from the system under test. It generates a screen component for each screen, which is a logical part of a page. A screen component contains one parameter for each field of the screen. When a value is assigned to such a parameter, the system enters it in the corresponding field, at execution time.

    A screen component reflects a single version of a screen. Different versions of a screen, for different tests, are stored in different logical components for different logical component groups. So test management can differentiate between different versions of the same screen. The version of a screen is the same on all systems of the same logical component. Otherwise, screen components are created.

You can reuse default and screen components in several test scripts. When a screen is updated, its screen components can be repaired, to make the repair of test scripts easier. This process uses the technical bill of material (TBOM) and business process change analyzer (BPCA), to reduce the effort of testing after a system update or upgrade. For more information, see TBOM Worklist and Business Process Change Analyzer.

You can also use existing CBTA script inside a CBTA script. This allows the re-use of already recorded steps of a selected scenario, for example.

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 a CBTA test script, steps are either default or screen components.

    You have the following options:

    • In the Comment column, you can enter or edit a description of the test script step.

    • In the State column, you can disable a test script step temporarily. During test executions, the step is skipped, so you can, for example, try various variants of a test script without having to remove steps.

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

      1. In the Type column, select a component type:

        • Use Default Component to perform basic actions, such as entering a value in a field, selecting a tab page, pressing a button, or clicking on a link.

        • Use Screen Component to set the values of a set of fields in one screen (SAP GUI) or views (CRM Web Client or Web Dynpro ABAP).

          To identify the screen or views of a field, do the following in the CBTA tool, choose the Get Additional Information button. Then, select the session showing the field and select the field with your mouse pointer. The technical information is displayed: the URI that identifies the field, and the screen (program and screen number for SAP GUI) or the application and view (CRM Web Client and Web Dynpro ABAP).

          To use this information to create a screen component, choose CBTA Inspection.

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

    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.

        • 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.

        • 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.

        For examples, see Editing a Test Script..

      2. Define the other columns as required.

        CBTA uses Unified Resource Identifiers (URIs) to identify the controls on a tested page. To retrieve a URI, choose Get Technical UI Information. For more information, see CBTA 3.0 <SP> - Runtime Library and Default Components at http://wiki.scn.sap.com/wiki/x/kQ_IFQInformation published on SAP site.

    • 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.

  6. To execute the test, choose Execute.

  7. If the execution of a CBTA test fails, you can edit the parameters of the screen component, do the following:

    1. Select the component and choose CBTA Inspection.

      You go to the Inspection Wizard screen.

    2. Select the SAP GUI screen, the CRM web client, or the Web Dynpro ABAP view.

    3. To create the screen components, start the inspection process.

    4. In the editor for the test configuration, on the Test Script tab, select the newly created screen component. On the Parameters sub tab, change the parameter values, where necessary.

More Information

For test scripts that were created with tools other than CBTA (eCATT or third-party), see Editing a Test Script.