Technology Blogs by SAP
Learn how to extend and personalize SAP applications. Follow the SAP technology blog for insights into SAP BTP, ABAP, SAP Analytics Cloud, SAP HANA, and more.
cancel
Showing results for 
Search instead for 
Did you mean: 
allam_drebes
Advisor
Advisor

Hello Everyone,

In this blog post I would like to show the steps to provision a Selenium Runner in a private landscape and connect it to Cloud ALM using SAP Cloud Connector. 

This blog post will directly shows configuration steps, for an details about Synthetic User Monitoring solution, refer to SAP Expert Portal .

The overall steps to provision the runner are the following:

  • Provision SAP Cloud Connector in Landscape & SSL Certificate Configuration
  • Register SAP Cloud ALM BTP Subaccount in provisioned SAP Cloud Connector
  • Provision Selenium Server with required components (OS, Browsers and Webdrivers)
  • Define connection mapping in Cloud Connector for the Selenium address
  • Configure Cloud Connector in Cloud ALM Landscape Management
  • Configure Runner in SAP Cloud ALM

You are ready to record scripts and deploy for execution in the provisioned runner

The complete architecture for Synthetic User Monitoring will look like following:

pic_overview.png

 

Now let’s see these steps in detail.

1) Provision SAP Cloud Connector in Landscape & SSL Certificate Configuration

An SAP Cloud Connector must be available in the landscape to allow the communication between Selenium Grid/Runner and SAP Cloud ALM. An existing Cloud Connector can be used, or a new one can be provisioned. The details how to install Cloud Connector are described in this SAP Help page .

SSL Requirement: SAP Cloud Connector must have a valid certificate installed. Refer for following documentations for this configuration:

Ensure that a valid certificate is available as follows in the Cloud Connector as shown in picture below:

pic_1.pngNOTE: It is possible to use a self-signed certificates.

2) Register SAP Cloud ALM BTP Subaccount in provisioned SAP Cloud Connector

Connect Cloud ALM SAP BTP Sub-Account in Cloud Connector, the Cloud ALM Expert Portal for details.

pic_2.png

IMPORTANT: Set a Location ID in the sub-account, this will be used later when registering the Runner in Cloud ALM (step #6)

3) Provision Selenium Server with required components (OS, Browsers and Webdrivers)

This step I will provide additional details. There are several ways to provisioning a selenium infrastructure, including different installation approaches Standalone or distributed scenario (Hub + Nodes).

Two simple ways to provision this infrastructure are the following:

  1. Docker image that provide a ready Grid with different browser options.
  2. Standard Installation

I will show here steps to provision a standalone Selenium Grid with Chrome webdriver.

  • Download the Selenium Grid (standalone) at Selenium Download > Selenium Server (Grid) area
  • Provision Web Driver:
    • Download Chrome Webdriver and extract to one location in the same server Selenium Grid will be running
    • Add Chrome Webdriver path to the PATH System Environment Variable
  • Start Selenium Grid using command:
    • java -jar <selenium_grid_<version>.jar> standalone
  • NOTE: It is highly recommended to setup HTTPS and credentials in Selenium Grid. Consider this additional configuration before proceed. 

This will start the Selenium Grid at http://localhost:4444/. You should be able to access it using browser:

pic_3.png

4) Define connection mapping in Cloud Connector for the Selenium address

To allow the communication between Cloud ALM and Selenium Server through Cloud Connector, it is required to configure the Selenium Server URL as a resource in Cloud Connector.

Under ‘Cloud to On-Premise’, configure the mapping to the Selenium Grid. In my example Cloud Connector and Selenium Grid were running at same server, hence ‘localhost:4444’ is the ‘Internal Host’ for Selenium Grid. Adjust the Selenium host and port according to your installation.

  • Required Paths: /
  • Access Policy: Path and All Sub-Paths

The configuration should look like the following:

pic_4.png

 Use the ‘Check Connection’ option in Cloud Connector to ensure that connectivity works at this Cloud Connector level.

5) Configure Cloud Connector in Cloud ALM Landscape Management

Define Cloud Connector in SAP Cloud ALM Landscape Management. This is a manual process, refer to Expert Portal.

pic_5.png

 6) Configure Runner in SAP Cloud ALM

  1. Go to Synthetic User Monitoring Configuration at Cloud ALM
  2. Open Runners Configuration
  3. Click on ‘Add’ and fill out runner details:
    • Name: <free selection>
    • Location ID: <Configured at Cloud Connector>
    • Protocol: <Configured at Cloud Connector>
    • Virtual Host and Port: <Configured at Cloud Connector>
    • User Name: <Selenium Grid Authentication> (Use dummy if no authentication defined in Selenium Grid/Runner)
    • Password: <Selenium Grid Authentication> (Use dummy if no authentication in Selenium Grid/Runner)

NOTE: It is highly recommended to setup HTTPS and credentials in Selenium Grid.

During runner registration or maintenance, Cloud ALM triggers test script execution to test connectivity between Cloud ALM and Selenium Server.

Complete details on Expert Portal.

pic_7.png

 CONTRATULATIONS

 You are ready to record scripts using Selenium IDE and deploy for execution in the provisioned runner.

Script Recording details will be cover in second blog post. See you soon. 😊

3 Comments