Prepare for SAP tests

To create SAP test cases, you need to prepare for steering SAP applications. This topic takes you through the necessary steps:

Activate scripting on the server

To steer SAP applications via the SAP scripting interface, you have to activate scripting on the server.

Before you can activate scripting in the system, you have to adjust the parameter sapgui/user_scripting in the profile file of the Application Server.

To prevent unintentional execution of automated tests in production, we recommend that you enable scripting only in development and test (QAS system) environments.

To activate scripting on the server, follow these steps:

  1. Open transaction RZ10 or RZ11 in the system:

    • RZ10 if you want to activate scripting on the server permanently. After you restart the server, scripting is still enabled.

    • RZ11 if you want to activate scripting on the server temporarily. After you restart the server, scripting is set to your previous default.

  2. Enter the parameter name sapgui/user_scripting and select Display.

  1. If the parameter value is currently set to FALSE, change it to TRUE.

  1. Depending on the SAP version you use, other scripting parameters may be set. If one or more of the following parameters are set, change their value to FALSE:

    • sapgui/nwbc_scripting

    • sapgui/user_scripting_disable_recording

    • sapgui/user_scripting_force_notification

    • sapgui/user_scripting_per_user

    • sapgui/user_scripting_set_readonly

Activate scripting on the client

To steer SAP applications via the SAP scripting interface, you have to activate scripting on the client:

  1. In the Logon window, open the menu and select Options.

  2. Go to Accessibility & Scripting > Scripting and select the Enable scripting checkbox.

  3. Clear the following checkboxes: Notify when a script attaches to SAP GUI and Notify when a script opens a connection.

Activate modal dialog boxes on the client

To steer SAP applications, you have to activate the modal dialog boxes on the client:

  1. Open the SAP GUI window and select the menu entry Help > Settings... on any screen.

  1. Go to the F1 Help tab and select the option in Modal Dialog Box in the Display section.

  1. Switch to the F4 Help tab and select the option Dialog (modal) in the Display section.

  1. To confirm, select the check mark button.

This is a per-user setting. You have to configure it on each client with which you want to test your application.

An SAP system administrator can set the system default setting to Dialog (modal).

Enable High Speed Connection (LAN)

To automate SAP applications, you have to ensure that High Speed Connection (LAN) is selected in the connection properties:

  1. Right-click on the SAP connection you use for test automation and select Properties....

  2. Go to the Network tab.

  3. In the Network Settings section, ensure that the High Speed Connection (LAN) option is selected.

  4. Select OK to accept the changes.

What's next

Now that you have prepared your environment, you can start creating SAP test cases.