{"id":31791,"date":"2022-07-19T13:14:24","date_gmt":"2022-07-19T11:14:24","guid":{"rendered":"https:\/\/www.blue.works\/?p=31791"},"modified":"2024-08-20T11:16:41","modified_gmt":"2024-08-20T09:16:41","slug":"synthetic-user-monitoring-sum-in-sap-cloud-alm","status":"publish","type":"post","link":"https:\/\/www.blue.works\/en\/synthetic-user-monitoring-sum-in-sap-cloud-alm\/","title":{"rendered":"Synthetic User Monitoring (SUM) in SAP Cloud ALM"},"content":{"rendered":"\n<p>This article was originally published on the <a href=\"https:\/\/blogs.sap.com\/2022\/07\/15\/synthetic-user-monitoring-sum-in-sap-cloud-alm-in-action\/\" target=\"_blank\" rel=\"noopener nofollow\">SAP Community blog<\/a><\/p>\n\n\n\n<p><strong>What is Synthetic User Monitoring and what can we do with it?<\/strong>&nbsp;<\/p>\n\n\n\n<p>Synthetic User Monitoring is a newest app in SAP Cloud ALM. In this app you are informed about availability and performance issues of your web applications&nbsp;<strong>before end users are getting affected by it<\/strong>. It does so, by executing on a regular schedule custom Selenium IDE scripts.<\/p>\n\n\n\n<p>By the way: SUM is not meant for application testing or for task automation. For this, there are other nice capabilities planned or already available.<\/p>\n\n\n\n<p>Selenium is an open-source framework for testing web applications. It consists of Selenium IDE (tool that is used to create Selenium scripts) and Web-browser-specific Selenium WebDriver (component that executes the Selenium scripts) with Selenium Grid (smart proxy server to provide easy way to run tests in parallel on multiple machines).<\/p>\n\n\n\n<p>Synthetic User Monitoring (SUM) provides us with 2 main benefits.<\/p>\n\n\n\n<p>It provides us with&nbsp;<strong>Proactive detection<\/strong>&nbsp;which enables us to detect issues early and even before the end-users encounter problems. Synthetic User Monitoring also provides us with&nbsp;<strong>Factual Metrics<\/strong>. SUM re-executes same scenarios, and it allows us to monitor the evolution of the performance and availability based on metrics collected.<\/p>\n\n\n\n<p>Let\u2019s have a look into the SUM main features:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Monitoring of web applications with custom Selenium IDE scripts. These Selenium IDE files are containing groups of test&nbsp;<strong>scripts<\/strong>.<\/li><li>Selenium remote web driver infrastructure is used for executing Scenario commands. For that you have to define&nbsp;<strong>runners<\/strong>, which are the components executing the tests of the scenarios.<\/li><li>Scenario execution intervals are configurable.<\/li><li>Metrics are captured at the&nbsp;<strong>scenario<\/strong>&nbsp;step level. Which means you can drill down a scenario to display performance and availability values on runner and step level.<\/li><li>Performance evaluation is based on configurable thresholds.<\/li><\/ul>\n\n\n\n<p>Currently SUM keeps the scenario\u2019s execution metrics for 14 days.<\/p>\n\n\n\n<p><strong>So what do we need to do now to get started with Synthetic User Monitoring?<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"860\" height=\"510\" src=\"https:\/\/www.blue.works\/wp-content\/uploads\/2022\/07\/image.png\" alt=\"\" class=\"wp-image-31792\" srcset=\"https:\/\/www.blue.works\/wp-content\/uploads\/2022\/07\/image.png 860w, https:\/\/www.blue.works\/wp-content\/uploads\/2022\/07\/image-768x455.png 768w\" sizes=\"(max-width: 860px) 100vw, 860px\" \/><\/figure>\n\n\n\n<p>To setup Synthetic User Monitoring you only have 2 prerequisites:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>You need&nbsp;<strong>Selenium Remote WebDriver infrastructure<\/strong>&nbsp;to configure runners \u2013 a client and a server. The client is your&nbsp;<strong>WebDriver test<\/strong>&nbsp;and the server is simply a&nbsp;<strong>Java servlet<\/strong>, which can be hosted in any modern&nbsp;<strong>JEE app server<\/strong>.<\/li><li>Selenium&nbsp;<strong>SIDE file<\/strong>&nbsp;to configure the scenarios.<\/li><\/ul>\n\n\n\n<p>The configuration of Synthetic User Monitoring involves 3 components:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Runners<\/strong>&nbsp;to define and configure where the monitoring scenarios are executed.<\/li><li><strong>Resources<\/strong>&nbsp;to upload and handle the Selenium IDE files.<\/li><li><strong>Scenarios<\/strong>&nbsp;to define and configure the monitoring scenarios.<\/li><\/ul>\n\n\n\n<p>Configuration of Synthetic User Monitoring is performed in the application itself.<\/p>\n\n\n\n<p>Setup and Configuration is done in 4 different steps:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>In Step 1 you configure Runners.<\/li><\/ol>\n\n\n\n<p>The Runner endpoint URL must be a trusted infrastructure because SUM sends the scenario commands to the runner endpoint, and it includes sensitive data maintained in the scenario configuration.<\/p>\n\n\n\n<p>Currently are only managed runners supported which means that the scenario execution is scheduled and triggered by the SUM backend.<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"2\"><li>In Step 2 you Import Resources.<\/li><\/ol>\n\n\n\n<p>Upload the Selenium SIDE files that contains your scripts. After import it becomes a new Resource entry in the SUM configuration. During this process, file content is analyzed, and test becomes a SUM Selenium script.<\/p>\n\n\n\n<p>In this step SUM detects the SUM variable annotations and automatically creates the corresponding SUM script variables.<\/p>\n\n\n\n<p>If the updated file gets re-uploaded in Synthetic User Monitoring, it is updated.<\/p>\n\n\n\n<ol class=\"wp-block-list\" start=\"3\"><li>In Step 3 you Maintain Scenario.<\/li><\/ol>\n\n\n\n<p>It means you create a scenario for your SUM scripts. Keep in mind that one runner can run several scenarios, but each scenario can only be assigned to one runner.<\/p>\n\n\n\n<p>Following good practice during SUM scenario creation it will also be necessary to appropriately set secured variables via the SUM configuration in the parameters section of the Scenario details.<\/p>\n\n\n\n<p>In the end of step 3, SUM allows you to adjust some Selenium Execution Parameters. The following properties are adjustable:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>Web browser to use (Currently are supported Edge Chromium and Chrome which is default choice).<\/li><li>The webdriver arguments to pass to the runner endpoint.<\/li><li>Execution speed which corresponds to a delay introduced after the execution of each command.<\/li><li>Element Wait timeouts \u2013 commands with several targets, you can add maximum wait timeout for each of the targets. This does not apply to the commands with an explicit timeout (the wait commands).<\/li><li>Global Wait timeouts \u2013 which is maximum time wait timeout to find the target of a command. This also does not apply to the commands with an explicit timeout.<\/li><\/ul>\n\n\n\n<ol class=\"wp-block-list\" start=\"4\"><li>In the step 4 we activate monitoring.<\/li><\/ol>\n\n\n\n<p>This means we activate the scenario on a runner.<\/p>\n\n\n\n<p>The connection between SUM and selenium script is established by the Selenium Remote WebDriver infrastructure. SUM accesses Selenium Remote WebDriver Infrastructure to pass the Scenario commands to execute.<\/p>\n\n\n\n<p>And now as promised, I\u2019ll show you SUM in action. Our scenario looks like this: We want to monitor if our Focused Build Requirements Management is available on the one hand, but performant on the other hand. To push it a bit further, we also want to check if a very special requirement (status: \u201cApproved\u201d and label \u201cSUM is great!\u201d) appears in the list. Currently the requirement is in status \u201cTo be Approved\u201d and our runner gives us an error. So we correct our Requirement and we set it to \u201cApproved\u201d.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"370\" height=\"250\" src=\"https:\/\/www.blue.works\/wp-content\/uploads\/2022\/07\/image-1.png\" alt=\"\" class=\"wp-image-31795\"\/><\/figure>\n\n\n\n<p>Then we go to the SUM app in SAP Cloud ALM and wait for the runner to execute the script again:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"357\" height=\"241\" src=\"https:\/\/www.blue.works\/wp-content\/uploads\/2022\/07\/image-2.png\" alt=\"\" class=\"wp-image-31798\"\/><\/figure>\n\n\n\n<p>As a summary, here again a drill-down in the SUM App into our scenario.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"394\" height=\"266\" src=\"https:\/\/www.blue.works\/wp-content\/uploads\/2022\/07\/image-3.png\" alt=\"\" class=\"wp-image-31801\"\/><\/figure>\n\n\n\n<p>SAP of course has some more features planned for SUM \u2013 so stay tuned.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Synthetic User Monitoring is a newest app in SAP Cloud ALM. In this app you are informed about availability and performance issues of your web applications\u00a0before end users are getting affected by it. It does so, by executing on a regular schedule custom Selenium IDE scripts.<\/p>\n","protected":false},"author":19,"featured_media":31810,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[9],"tags":[206,312],"class_list":["post-31791","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-sap-alm-insights","tag-sap-cloud-alm","tag-synthetic-user-monitoring"],"acf":[],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/www.blue.works\/wp-content\/uploads\/2022\/07\/Screen-shot_CALM5.jpg","_links":{"self":[{"href":"https:\/\/www.blue.works\/en\/wp-json\/wp\/v2\/posts\/31791","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blue.works\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blue.works\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blue.works\/en\/wp-json\/wp\/v2\/users\/19"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blue.works\/en\/wp-json\/wp\/v2\/comments?post=31791"}],"version-history":[{"count":3,"href":"https:\/\/www.blue.works\/en\/wp-json\/wp\/v2\/posts\/31791\/revisions"}],"predecessor-version":[{"id":31813,"href":"https:\/\/www.blue.works\/en\/wp-json\/wp\/v2\/posts\/31791\/revisions\/31813"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.blue.works\/en\/wp-json\/wp\/v2\/media\/31810"}],"wp:attachment":[{"href":"https:\/\/www.blue.works\/en\/wp-json\/wp\/v2\/media?parent=31791"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blue.works\/en\/wp-json\/wp\/v2\/categories?post=31791"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blue.works\/en\/wp-json\/wp\/v2\/tags?post=31791"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}