SAP GUI testing
This chapter provides all the elements required to properly run SAP GUI applications tests.
You can also check out our SAP GUI Testing FAQ.
Prerequisites
Before using the SAP GUI-compatible version of NeoLoad, the following requirements must be fulfilled:
-
An SAP GUI client must be installed on your computer. Supported versions by NeoLoad are 7.4, 7.5, 7.6, 7.7 and 8.0 (starting from patch level 6).
-
An SAP GUI client must be installed on each NeoLoad Load Generator.
-
SAP GUI 7.60 and 7.70 are supported by NeoLoad 64 bits since version 7.11. For older SAP GUI versions, the NeoLoad Controller used to record and the Load Generators to be used for SAP GUI tests must be 32 bits.
-
The Load Generators to be used for SAP GUI tests must be launched in process mode (service mode is not supported).
-
SAP GUI scripting must be enabled. For more information, see Enable SAP GUI scripting.
-
Supported O.S to record and run SAP GUI tests: Windows 7, Windows 10, Windows Server 2008, Windows Server 2012, Windows Server 2016.
-
Your license must include SAP Virtual Users to allow recording and replaying tests (NeoLoad Free edition include 5 SAP VUs).
Caution: SAP Virtual Users are reserved to Professional and Enterprise editions. For more information, see NeoLoad pricing.
Recording an SAP GUI application
-
Before recording an SAP GUI application, the following requirements must be met:
-
An SAP GUI client is installed on your computer (7.4, 7.5, 7.6 or 7.7).
-
SAP GUI scripting must be enabled. For more information, see Enable SAP GUI scripting.
-
Your license must include SAP Virtual Users to allow recording and replaying tests (NeoLoad Free edition include 5 SAP VUs).
-
-
In NeoLoad, go to Record > Start SAP Recording. For more information, see Record an SAP GUI application.
Editing an SAP GUI User Path
After the User Path is recorded, you can insert Actions like ‘Read’, ’IsSelected', ‘IsChangeable’ or ‘IsAvailable’ to:
-
add a conditional flow when combined with a condition: If ... Then ... Else.
-
add a validation point by adding a response Validation on the Action. For example, you can ensure that the Text returned by ‘Read’ has the expected value by adding a response Validation.
For more information, see SAP GUI Actions.
Tip: Any screenshot or image can be copied and pasted on an SAP Action with a click on the paste button after copying the screenshot or image to paste.
Generating a higher load with Remote Desktop Services
Machines running SAP GUI Virtual Users may be limited in the number of Virtual Users they can run, due to the graphic resources available to that machine.
You can generate a higher number of Virtual Users on high-end servers (high CPU, high memory) by using several Remote Desktop Services sessions on the same machine.
For more information about installation prerequisites, see the Terminal Services installation guide.
With NeoLoad
NeoLoad can remotely start as many Windows sessions as required on each Windows Server used as Load Generator. Each Window session automatically starts a Load Generator process which is automatically added to the list of available Load Generators for the zone.
For more information, see the Terminal Services tab from the Load Generator Zone settings.
For more information, see Terminal Services.
With custom scripts
If the NeoLoad Terminal Services feature cannot be used for any reason and a custom script is required, here is the command to start a Load Generator Agent in Terminal Services mode:
NeoLoad 6.7\bin\LoadGeneratorAgent.exe -terminalServices
The Load Generator then uses a unique working folder and picks an available port dynamically. Add the Load Generator to NeoLoad by using the Bind action from the Terminal Service feature. For more information, see Terminal Services.
Screenshots on error
In the case you have troubles identifying the cause of a failure, you can select the Show SAP GUI interface and take screenshots on error option when running the test. You can see the screenshots in the detail of the error listed in the Errors tab of NeoLoad.
It is recommended to select this option only for debugging purposes as it consumes a large amount of graphical resources and may return unreliable response times and raises additional errors in case of an overloaded Load Generator. You may need to decrease the load in such mode. For more information, see Runtime errors.
SAP Business Client
Caution: SAP Business Client and SAP GUI are identical at protocol level. However, load testing of SAP GUI applications through SAP Business Client is not supported by NeoLoad.
Recording
It is possible to record SAP GUI application in SAP Business Client with NeoLoad:
-
The following key must be added to "controller.properties" file in section [Recorder]:
Copycontroller.recorder.sap.business.client=true
-
Enable SAP GUI OK code must be selected in Settings > SAP GUI Interoperability as shown below.
-
The Search or enter application name or transaction code text field cannot not be used. Only the SAP GUI OK code field can be used.
Runtime
To replay with SAP Business Client, add the "sapBusinessClient" parameter with value "true" to the SAP Connect Action.