How to connect to a SAP server?
▶️ You can find a tutorial on how to connect to a SAP server on our Youtube channel
To use SAP you need to install a client: the SAP Logon. This client will allow you to interact with the SAP server. A connection is declared in this client with the elements transmitted by the SAP administrator, notably the target server.

To connect to an SAP server, the operation is the same as for any other application tested on Agilitest.
So start by a “Start channel” action
.png)
Then select the SAP shortcut to set the channel from the drop-down menu in the input bar.
.png)
Enter the details of the SAP server, present in the SAP log on, i.e. the name of the connection, the customer number (i.e. the associated mandate number) and possibly the language (EN/FR/...).
Then click on "Activate 'Basic authorization" to enter your login details: username + password.
.png)
💡 Tip
To prevent your password from appearing in the test, consider creating an encrypted password from the project properties menu.
To start the connection in English, in the logon part you can change the language by adding "/EN" at the end of the id.
.png)
During the execution the connection is done automatically. Once connected, the driver takes over the open SAP window on the SAP home page.
🔸 Warning
“:” is also a possible separator in the connection chain to an SAP channel.
Example: connection_name:customer_number:language
Session saved in the ATS properties
As a reminder it is also possible to configure commonly used applications to appear directly in the applications panel in the channel opening action. This is also possible for the sessions you have access to, including SAP sessions.
This shortcut allows you to avoid sharing information related to the connection to an SAP server (id, passwords) if you want to work on an SAP test on several workstations.
To use this shortcut, you need to modify the ATS properties.
To access the ATS properties, go to the "Settings" menu in Agilitest.
.png)
Then click on “Edit configuration” in the ATS settings
.png)
This will open the ATS properties page where you can configure various elements.
.png)
Below is an example of a possible configuration for an SAP session:
📙 SAP Configuration
<sap>
<timeOut>200</timeOut>
<sessions>
<session>
<name>MySAP</name>
<client>800</client>
<connection>(Logon_id)</connection>
<authentication>(Code_source_ATS)</authentication>
</session>
Authentication can be found in the ATS code of your script with an SAP connection.
To access it, open your script and click on the “Script header data”.
.png)
Then click on “Code ATS”

This displays all the actions of the script in code form.
To fill in the connection information in the properties, recover the code string data corresponding to the SAP server connection from the "start a channel" action.
.png)
Copy the connection information in the ATS properties.
.png)
Once you have entered the information, save your file and return to the Agilitest applications menu where you will find the session you have entered.
%2520(1).png)