SAPGUI Application Architecture

The SAPGUI application object, which is instantiated once per virtual user in test scenarios, can have infinite SAP connections. A connection can be opened with either SapGuiOpenConnection or SapGuiOpenConnectionByName. One connection should be opened by each virtual user that you want to simulate at the beginning of your test. When opening a new connection, an SAP session is created as well. A connection can hold up to 6 sessions, which can be created with SapGuiCreateSession.

When the last session on a connection is closed, the connection itself is closed and destroyed.

An SAP session holds the information about all control elements on the main window of the session. Additionally, a session info object can be accessed for specific data about the current transaction or performance related data.

Application architecture

An SAP session usually has a main window as its child. This window is the starting point for all user interaction with the current session.