Recording an SAP test
You can record your interaction with the SAP GUI client to generate an SAP test. When you record, the recording wizard opens the SAP GUI client and records all the interactions that occur between the client and the server.
Before you begin
You must have completed the following tasks:
-
Verified that SAP GUI scripting is enabled on the SAP server and the SAP GUI client. See Configuring SAP for performance testing.
-
Working SAP GUI client that you can connect to an SAP server.
-
Verified that tests are stored in performance projects. If your workspace does not contain a project, the test creation wizard enables you to creates one.
-
Ensured that the session that you are recording is reproducible.
For example, if you create items in SAP and do not delete them, then if items created in SAP are already exist when the test is run, that might cause the test to not run as expected.
About this task
You can record and generate a test by using REST APIs. The API documentation to record a test is located at Install_directory\IBM\IBMIMShared\plugins\com.ibm.rational.test.lt.server.recorder.jar. The API documentation to generate a test after the recording completes is located at C:\Program Files\IBM\IBMIMShared\plugins\com.ibm.rational.test.lt.server.testgen.jar.
You must install the latest version of SAP GUI when you want to record an SAP test in Rational® Performance Tester. For more information about supported SAP GUI versions, see System Requirements.
-
Both 64-bit and 32-bit Rational® Performance Tester supports the SAP protocol.
-
When you install Rational® Performance Tester by using the shell-shared method and run an SAP test or a compound test that has an SAP test in it, the SAP web analytics report displays only the SAP Summary and Screen Performance pages after the test run is complete.
Procedure
- Open Rational® Performance Tester.
-
Click the New Test From Recording icon , and then click SAP Test.
Note: You can also click , and then select SAP Test. You can then select the encryption level, if required and click Next to open the Select Location page.
The Select Location page is displayed.
-
Create a test by performing the following steps:
- Select a project, and then select a folder from the project.
- Enter a name for the test.
- Optionally, click Recording encryption level, and then select the encryption level when you are recording any sensitive data.
-
Click Next.
The Select Client Application page is displayed.
-
Select SAP Batch Input Recording or SAPGUI
For Windows, and then click Next.
Note: When you record an SAP test by using the SAP GUI For Windows method and if you use many split points, then steps might not split properly after the SAP recording is complete. The split action during the SAP recording comes into effect only after an SAP request by changing the state of the current screen. After the test generation is complete, you must use the Split Test action for splitting the steps to different SAP tests from the test editor.
-
On the SAP Connection page, select how to connect to the SAP server:
- In most cases, select SAP Logon; then enter the description normally used by SAP Logon to identify the server in SAP system name.
- If your environment does not support SAP Logon, select Server information. In Application server, enter the host name or IP address of the server. Then specify a value for System number. Enter information in Other options, if required. Refer to your SAP documentation for details about the other SAP Logon options.
- If your environment uses gateways or routers to connect to the SAP server, select Connection by string. Click Edit to specify a valid connection string. Refer to your SAP documentation for details about connection strings.
- If you have an SAP shortcut file to automate the connection, select SAP shortcut file. Click Browse to specify the location of the file.
- You also have the option of logging on to SAP through the HTTP SAP Portal. See Recording a session with HTTP SAP Portal for more information.
- If you want to skip the logon process and start the recording from a specific screen in the middle of a session, start a session with the SAP Logon program, go to the screen, and then select Record from a running session started with SAP Logon. The recorded test will not contain any connection information. This option can be useful for creating split tests. See Recording a specific SAP transaction from a running SAP session.
- If this is the first time you record a SAP performance test, read the privacy warning, and select Accept.
- Click Finish to start recording.
In some cases, you might see a warning that a script is opening a connection to SAP.
- Log on to SAP and complete the transactions to test.
For security reasons, the password cannot be recorded by the SAP test recorder. Instead, it is requested at the end of the recording session.
- In the SAP GUI window, perform the tasks for testing.
You can use the Recorder Test Annotations toolbar to add comments, record synchronizations, or take screen captures during the recording.
-
To add a comment to the recorded test, click the Insert comment icon .
-
To add a screen capture to the recorded test, click the Capture screen icon . Screen and window captures make your tests easier to read and help you visualize the recorded test. You can change the settings for screen captures and add a comment to the image.
-
To manually add a test synchronization to the recording, click the Insert synchronization icon .
-
To insert a split point into the recorded test, click the Split point icon button. Split points allow. With split points, you can generate multiple tests from a single recording, that you can replay in a different order with a schedule. See Splitting a test during recording for more information about splitting a test.
-
- When you have completed the transactions to be tested, stop the recorder by closing the SAP GUI or by clicking Stop in the Recorder Control view.
- In the Enter Password window, enter
the password for the account that was used for recording.This step is required because SAP GUI does not allow direct recording of the password.
A Test Generation Progress window is displayed while the test is being generated.
The following message is displayed on the progress window: Test Generation completed.
What to do next
You can now play back the test and check the performance results.
Before playing back a test, in SAP Connection Details editor, click Test Connection to test the connection to the SAP GUI server.