Show TOC

Test Script EditorLocate this document in the navigation structure

Use

You use the test script editor to create and maintain test scripts. You can use the recording functions, or directly input eCATT commands into the command editor.

The test script editor has the following areas:

  • Application toolbar

  • Information area

  • Editor tab

    • Parameter list

    • Command editor

    • Structure editor

  • Attribute tab

Parameter List

The parameter list contains the parameters and the command interfaces. You can toggle between the display of parameters and command interfaces by choosing Parameters <-> Command Interface.

When you make changes in the parameter list, you can refresh the list by choosing Refresh. This not only refreshes the display, but also re-reads the definition of the ABAP Dictionary reference (from the target system if specified) of each parameter and recreates the structure of structured parameters. Values in a structured parameter are retained in fields of the same name in the recreated structure.

Values of simple parameters are displayed and edited in the parameter list. Irrespective of whether a value is numerical or otherwise, do not enclose it in inverted commas. This is different to the structure editor.

When defining structured parameters in the parameter list, you assign ABAP Dictionary references in the Parameter Reference field. For example, if you want to reference SPFLI and enter:

  • SPFLI, the parameter is a structure

  • SPFLI[], the parameter is a table

You can display the values of a selected command interface or structured parameter by choosing Display Parameter Value. The values are displayed in the structure editor, where they can be edited.

In the parameter list, you define the visibility of parameters. This determines whether a parameter is treated as an export parameter (E), an import parameter (I), or a local variable (V).

Command Editor

The command editor is a basic text editor. Here, you enter eCATT commands:

  • By using Pattern in the application toolbar

  • From the keyboard

  • By copy and paste

  • From a file

You can also use standard ABAP commands enclosed inside an ABAP ..... ENDABAP block.

You can use Save as Local File to save the contents of the command editor to a local file. Local files can be edited in standard text editors such as Notepad.

When you use Load Local File to load commands from a local file, it overwrites everything in the command editor.

You can display a command interface in the structure editor by double-clicking the name of a command interface. If the command interface does not yet exist it is also entered in the parameter list.

You can use Check to check the syntax in the command editor. If you have entered a statement containing a command interface that does not yet exist, the command interface is automatically entered in the parameter list. This function does not check the syntax of inline ABAP. To check inline ABAP (as well as the normal eCATT commands), choose Test Start of the navigation path Script Next navigation step Check Next navigation step Extended End of the navigation path.

Forward Navigation

For forward navigation in Workbench objects, double-click on the relevant object (for example, class name, table, function module, and so on), or position the cursor on the object and choose Start of the navigation path Position on Next navigation step <objectname> End of the navigation path from the context menu (right mouse button).

Editing Commands

By double-clicking the relevant command in the command editor (or by positioning the cursor on the command and choosing Start of the navigation path Edit Next navigation step Command End of the navigation path), you can display the relevant Change Command dialog box.

Breakpoints

Lines with breakpoints are highlighted with color.

To set or delete a breakpoint, place the cursor at the relevant place in the script and choose Start of the navigation path Utilities Next navigation step Breakpoints Next navigation step Set/Delete End of the navigation path.

Drag and Drop for Paths from the Structure Editor

You can use drag and drop to copy paths from the structure editor into the command editor.

Pretty Printer

If you choose Pretty Printer, the text is automatically adapted to comply with certain rules regarding indentation, capitalization, and so on. You can change these rules under Start of the navigation path Utilities Next navigation step Settings Next navigation step eCATT Next navigation step Pretty Printer End of the navigation path.

Structure

You use the structure editor to display and edit a structure. A structure can be a command interface or a structured parameter.

Displaying Structures in the Structure Editor

When you first open the script editor, the structure editor is not visible. To display a structure, double-click it in the parameter list or command editor. As an alternative, you can select the structure in the parameter list, and choose Value of Command Interface. The structure editor then displays the selected structure.

The left-hand side displays the selected structure as an hierarchical tree. You can click on the nodes to expand or collapse the tree.

Depending on the command, various options for the display of the structure can be chosen: User View, Complete View, or XML Document View. The following table shows the availability of the views.

Command

User View

Complete View

XML View

SAPGUI

GETGUI

CHEGUI

Yes

Yes

Yes

WEBDYNPRO

Yes

No

Yes

Others

No

Yes

Yes

The user view only shows the one GUI element level. Therefore, it easier to find the relevant fields. Certain things can only be edited in the complete view, for example, ConnectionId and SessionId in the SAPGUI command. The XML view is read only.

When working with larger structures, it is often convenient to maximize Maximize the structure editor to fill the entire Editor tab. Afterwards, you can choose Minimize to restore it to its normal size.

Assigning Values

You maintain the values of a structure in the right-hand side of the structure editor. To display fields of a structure for editing, double-click the corresponding elements in the tree. The selected elements are displayed in the right-hand side of the structure editor.

Values can be initial, fixed, or parameterized. This is indicated in the tree by the following symbols.

Icons Used:

Icon

Meaning

The value has been parameterized.

No value has been assigned.

A fixed value has been assigned.

You can only parameterize command interfaces, not structured parameters.

Creating Parameters and Fixed Values

You can automatically create parameters from the structure editor. Enter a name in a field in the structure editor. Then, when you choose enter, you will be prompted to define it as a parameter or fixed value. If you enter several new names and select Apply to All Entries, parameters will be created for all the entered names.

Fixed Values

Enter strings with inverted commas and numerical values without. This is different to the parameter list.

Screen Simulation

You can use the screen simulation to help parameterize TCD transactions and WEBDYNPRO applications. To go to the screen simulation, select the screen or page that you want to maintain and choose Simulator.

Downloading Test Scripts

You can download a test script as an XML file.

Search Function

You can choose Start of the navigation path Edit Next navigation step Search End of the navigation path to display the Find dialog. The results of a search will are displayed at the bottom of the screen. From there you can navigate to the relevant place in the editor. This is particularly useful for finding things in large command interfaces.