-
Request for existing cases, user IDs, Portal navigation support and more
Request for existing cases, user IDs, Portal navigation support and more
Synthetic User Monitoring (SUM) configuration is to be performed via the application itself.
The configuration involves the following components:
To set up Synthetic User Monitoring you need:
The first step during the setup is the creation of a SUM Runner. A runner is the component in charge of the execution of the monitoring scenarios.
Every runner has a Runner Endpoint. A runner endpoint is the Selenium remote webdriver infrastructure that Synthetic User Monitoring (SUM) accesses to pass the scenario commands to execute.
It also hosts the web browser used to access the monitored applications.
To access the endpoint, SUM uses the connection information defined in the runner configuration. Two types of configuration are possible:
Internet | The endpoint is access via the HTTPS URL specified in the configuration. |
On-premise | The endpoint is access via the Cloud Connector information specified in the configuration |
For Internet type, only HTTPS URLs are supported.
A runner endpoint can be located in the cloud or on-premises.
To get a Selenium remote webdriver infrastructure, you have several possibilities:
Some companies are specialized in providing such infrastructure (SauceLabs, BrowserStack, LambdaTest, ...).
This is often the easiest way to obtain a reliable and efficient execution infrastructure.
Please note: SAP does not recommend any specific Selenium remote webdriver infrastructure provider.
You can find more information about Selenium remote webdriver here.
The runner endpoint URL must be a trusted infrastructure. SUM will send the scenario commands to this URL, including sensitive data maintained in the scenario configuration.
If necessary you can adjust the endpoint of the SUM Runner later.
Perform the required changes
Once you enter changes the "Save" and a "Discard" button will appear. Changed fields will be highlighted.
Hint: After saving, you can test your settings using the Test Connection button (for details see FAQ - How to test the connectivity of a Runner infrastructure?).
When a new SIDE file is imported, it becomes a new Resource entry in the SUM configuration.
During the import process, the SIDE file content is analyzed and:
Script Names and IDs
Names and IDs come directly from the SIDE file.
Script Element | SIDE Element | Internal Identifier |
---|---|---|
Script | Name of the test suite | Identifier of the resource (SIDE file) + GUID of the Selenium test suite |
Step coming from a test | Name of the test | Identifier of the Script + GUID of the Selenium test |
Step coming from an annotation | Annotation text | Identifier of the Script + GUID of the Selenium command |
Nested Tests
Via the "run" Selenium command, a test can call another Selenium test (in the SIDE file).
In this case, the commands inside the called test belong to the current SUM step. Moreover, if a called test contains SUM step annotations, they are ignored.
Step Thresholds
When the steps are created, they are automatically configured to:
You can set up thresholds later as described in the section "Scenario Maintenance"
SUM Variables
When the SIDE file is imported, SUM detects the SUM variable annotations and automatically creates the corresponding SUM script variables.
By default, the value of the created variable will be the "value" field of the corresponding Selenium command.
If during the SUM scenario creation good practice was followed, the secured variables don't have their correct value. It will be necessary to appropriately set them via the SUM configuration in the parameters section of the Scenario details as described in the section "Scenario Maintenance".
The third step is to create a scenario for your SUM scripts.
You can create several scenarios from the same Selenium IDE script.
One runner can run several scenarios.
Each scenario can be assigned to several runners.
The creation will automatically open the Scenario Details view. You can also access this later by clicking on the line of the scenario in the scenario table.
Additionally, you can:
For more information refer to the FAQs section.
The forth step (last required step) is to activate the scenario on a runner. Please note that you can assign several runners to a scenario. Also, you can use a same runner for several scenarios.
SUM supports events for both the availability and performance issues.
SUM scenarios can be assigned to several business services (at minimum one), therefore, you need to decide which business service to configure. Refer to the FAQs to learn how to assign/unassign a scenario to a business service.
In the business service configuration, click on the Events tab.
A table indicates which event configuration is active.
By default, SUM keeps the scenarios executions metrics for 14 days. This retention period is configurable. the minimal value is 7 days. The maximum is 30 days.
The alerts triggered by SUM, are automatically deleted when the execution, that initially triggered the event, is housekept.
SUM also stores hourly-aggregated executions for 31 days. This can be configured. The retention time for the aggregated data cannot be smaller than the retention time for the single executions. The maximum is 190 days. The retention of aggregated executions can be also be disabled.
For the screenshots and the metrics captured during the scenarios executions, SUM has specific retention periods:
Screenshots and metrics can consume a lot of space. This is something to consider when configuring their retention period.
To adjust SUM housekeeping setting:
The change will be taken into account the next time the housekeeping job is executed. This happens once a day.
Term | Description |
---|---|
Scenario | Monitoring scenario - A Selenium Script scheduled to be regularly executed by a Runner |
Step | Monitoring scenario step - Sub-part of a monitoring scenario focusing on a specific action. |
Script | Selenium IDE test suite describing a sequence of actions (a.k.a. commands) to perform on the application to monitor. This is what simulates the end-user actions on the monitored application. |
SIDE file | Selenium IDE file containing one or several test suites that Synthetic User Monitoring will use as Scripts. SIDE files are produced by the Selenium IDE plugin when a Selenium test project is saved. |
Resource | External file uploaded in the SUM database. Currently, the only resource SUM supports is Selenium IDE (SIDE) files. |
Selenium | Selenium is an open-source framework dedicated to Web application tests. |
Annotation | Synthetic User Monitoring specific keyword added into the comment section of a Selenium command. |
Runner | The component in charge of the execution of the monitoring scenarios. |
Runner endpoint | Selenium remote web driver infrastructure: the entity hosting the web browser and the web driver used to access the monitored applications |
Business Service | Logical component associating a set of SUM Scenarios with a set of LMS Cloud Services (and/or Systems).The Business Service is also the configuration point for the SUM events. |
Selenium is an open-source framework dedicated to web application tests.
It consists of several components.
In the context of the Synthetic User Monitoring, the involved Selenium components are mainly:
Important: Selenium is not developed by SAP.
Usually designed with the Selenium IDE component, a Selenium IDE script (or SIDE file) corresponds to a Selenium IDE project.
It describes the sequences of actions (also referred to as commands) to be performed on a web browser, such as clicks, setting texts, waiting for elements, etc.
These sequences are organized into:
Each action has a set of attributes to indicate:
Selenium IDE proposes several different commands, most of which are supported by Synthetic User Monitoring. Please refer to the complete list of Selenium commands supported by SUM for details.
To help with the script creation, the Selenium IDE proposes a recorder.
It also gives the possibility to play back the script.
When such a script is saved via the Selenium IDE, it generates a ".side" file.
This file is the JSON representation of the sequence of actions.
SUM identifies a SIDE file via both its Project name and the main ID (GUID) in the .side file.
If a SIDE file with the same project name and GUID is re-imported, SUM will not create a new resource entry. It will update the existing one.
Please note: Only the resource owner can update it.
During the import, the following changes are performed:
At Script level
Scripts no longer in the SIDE file are deleted. If SUM scenarios exist for the script, then the update is rejected. I.e. only scripts without scenarios can be removed.
At Step level
Please note: If a step annotation is moved from one command to another - i.e. with the same step name - SUM considers that it is a new step. (Steps coming from an annotation are identified by the Script identifier plus the GUID of the Selenium command)
At SUM Variable level
SUM identifies a SIDE file via both its Project name and the main ID (GUID) in the .side file.
If when you re-import a SIDE file, you want to create a new resource - i.e. new Scripts - then you need to change one of the two above elements.
The easiest is to change the project name. For instance:
The scenario availability depends on the success of the Selenium IDE commands during the scenario execution.
If a command fails during execution, the scenario availability will be rated as failure (Red).
A command failure can be caused by:
If the script defines steps, then SUM will also evaluate the availability at the step level.
For a given execution, the step availability depends on the success of the commands in the step.
Info: Generally, when a failure happens, the SUM scenario execution is interrupted.
Except for the verify commands. In this case, the scenario availability is rated as failed but the execution continues.
If the scenario script defines steps, then SUM will also evaluate the availability at step level. For a given scenario execution, the step availability depends on the success of the commands in the step.
The scenario performance depends on the response time (i.e. duration) of the scenario and scenario steps execution.
The response time is compared to a pair of thresholds: Green-to-Yellow and Yellow-to-Red.
For each scenario, performance thresholds can be defined at:
For each execution, SUM provides performance metrics for:
It considers the total response time of the execution (i.e. all the executed commands, in all the steps).
The scenario level performance is evaluated only if both:
The scenario level performance is:
Considers the response time of the step execution (i.e. all the executed commands in the step).
For a given step, the step level performance is evaluated only if both:
The step level performance is:
For an execution of the scenario the overall performance will be:
Performance thresholds are dynamically calculated. You don't have to maintain them.
They are automatically defined by SUM, based on the historical executions of the scenario on the runner.
The dynamic thresholds follow 3 stages:
Not Available
This stage corresponds to the period when SUM cannot determine the thresholds because there is no valid historical execution.
A scenario-on-runner is on this stage when:
It generally stay "Not Available" for one valid execution. Then the scenario-on runner enters in Learning stage.
Learning
This stage corresponds to the period when SUM doesn't have enough valid historical execution to have the "predictive" algorithm running: SUM is still learning.
During this intermediate period, the thresholds are computed from simple statistical formulae.
So the performance evaluation is less accurate.
This period generally last 3 to 5 days depending on the scenario scheduling and the ratio of valid historical executions.
Predictive
This stage corresponds to the normal situation.
A scenario-on-robot is in Predictive stage when SUM has enough valid historical executions for it.
This means SUM can use its "predictive" algorithm to determine what should be its "normal" duration for the future execution.
Prediction calculation
The predictive algorithm is based on SAP HANA Predictive Analysis Library (SAP HANA PAL).
It is expected to detect the daily, and / or weekly seasonality, if existed.
For every scenario-on-runner in predictive stage, SUM tries predict what should be the normal executions duration for the next 3 days.
Every 6 hours, SUM re-evaluated the accuracy of the prediction. If it deviates to much, then it triggers a recalculation of the prediction.
The current stage is indicated in the Scenario configuration:
How to know what is a scenario-on-runner current stage?
The current stage is indicated in the Scenario configuration:
By default, SUM evaluates the performance of each scenario and each of its steps. However, you can disable the Performance evaluation:
Globally
Independently
By default, SUM executes the scenarios every 5 minutes (300 seconds).
You can configure the time interval at which a scenario is executed.
If you defined SUM variables in your Selenium test script SUM uses the default values defined in the script during its execution.
However, you can specify different values in the context of a scenario.
SUM allows you to adjust some properties related to the execution of the Selenium script associated with the scenario.
For instance, the web browser to use, the selenium IDE "execution speed", etc.
You can adjust the following properties:
Property | Description |
---|---|
Browser > Browser | The web browser to use. Currently, SUM supports Chrome (default choice) and Edge Chromium. |
Browser > Webdriver arguments | The webdriver arguments to pass to the runner endpoint. (e.g., --headless, --incognito, etc.) |
Execution > Execution speed | This is similar to the Selenium IDE "Test Execution Speed". It corresponds to a delay introduced after the execution of each command.
|
Execution > Element Wait timeout [s] | When a command has several targets, this is the maximum wait timeout for each of the targets. Does not apply to the commands with an explicit timeout (e.g. the wait commands) |
Execution > Global Wait timeout [s] | Maximum time wait timeout to find the target of a command. Does not apply to the commands with an explicit timeout (e.g. the wait commands) |
Screenshots > Automatic screenshots | Possible options are:
|
Screenshots > Enable explicit screenshots | When enabled, a screenshot is taken after each command with the @sap.sum.screenshot annotation. |
Metrics > Active metrics | Enable or disable the capture of the browser-side metrics. Possible options are:
|
With SUM Business Services, you can group your scenarios monitoring a same application.
You can also indicate which LMS Cloud Service (or System) is involved in the monitored application.
Last but not least, the events SUM can send are configured at business service level.
Confirm the unassign.
Please note:
A scenario must be associated to at least one business service.
If this is the only assignment of the scenario, SUM will reject the unassign.
To unassign it, it will be required to first assign it to another business service (for instance, the "Default SUM Business Service").
Please note:
A business service must be associated to at least one LMS cloud service or system. If this is the last assignment, SUM will reject the unassign.
To be able to delete an LMS Cloud Service (or an LMS System), it has to be unassigned from any SUM Scenario.
SUM scenarios are assigned to LMS object via SUM Business Services.
Therefore, to dissociate SUM scenarios from an LMS object, you can:
If your Runner infrastructure requires some specific webdriver capabilities, you can define them in the Advanced section of the Runner endpoint configuration. Each capability is composed of a name and a value. For the value, SUM supports the following types:
To set a new capability:
In the SUM configuration, you can test that your Runner infrastructure is properly set up: can be accessed by SUM and can reach the URL you want to monitor. For that:
This will trigger a new test.
The result is visible in the Runner Details header and is represented by a chain of a 4 icons where each icon corresponds to one step of the test.
Steps are successively testing that:
In the configuration, you can indicate:
Property | Description |
---|---|
Connection Check → Browser | The web browser to use for the connection test. Here you should indicate the most relevant Browser for your runner. |
Connection Check → Checked URL | The URL to try to access during the connection test (step 4 - URL Check). Here you should typically indicate the entry URL of one of your Scenario to ensure that the runner will be able to access it. |
Advanced → Initial Connection Timeout | The maximum time (in second), waited by SUM when it tries to initiate a new session on the runner infrastructure. This property is used both for the Connection Test and at runtime when a scenario is executed. The minimum value is 5 seconds.The maximum value is 60 seconds. |
To change a property:
In case you encounter problems using or setting up Real User Monitoring in SAP Cloud ALM, please report a case using one of the following components:
Please select your SAP Cloud ALM tenant when reporting the case.