Git integration

You can integrate Git with OpenText Core Performance Engineering enabling you to upload scripts from your Git repository.

Install and configure a Windows Git agent

The Git agent connects your Git repository to your OpenText Core Performance Engineering tenant.

Prerequisites

The following are the prerequisites for installing the OpenText Core Performance Engineering Git Agent:

  • A Windows x64 operating system

  • A local Git installation

Install and configure the agent

Do the following to install and configure the OpenText Core Performance Engineering Git agent:

Action How to
Download and install the agent
  1. Download the Git agent from the LoadRunner Cloud banner > Tools and Integrations > Agents area.
  2. Extract the downloaded package and run LoadRunnerCloudGitAgentSetup.exe to install the agent.
Configure the agent
  1. The Git Agent Configuration tool is automatically started when the agent installation is completed.

    To run the configuration tool manually at any time, go to Start > LoadRunner Cloud - Git Agent > right-click Configure Git agent and select Run as administrator to open the OpenText Core Performance Engineering Git Agent Configuration tool.

  2. On the General tab specify the following:

    1. An agent name.

    2. Your client ID and secret key. For details, see API access keys.

      Note: Tenants created before version 24.3 can authenticate using the username/password or OAuth authentication methods. However, tenants created for version 24.3 and higher may only authenticate with the OAuth method with a client ID and secret key. The preferred and more secure method is to always authenticate with a client ID and secret key, even for earlier versions.

    3. Your tenant id.

    4. Your project id.

    5. Whether to Share this agent with other projects. Make sure that the user entered above has access to the projects that need to use this Git configuration (available from the Git Agent installer version 2021.08 and later).

      Note: Git agent sharing can only be done when initially registering an agent. If a Git agent is shared, the repositories configured on the agent are visible to all assigned projects.

  3. On the Misc tab:

    1. To use a proxy other than the one shown, enter your proxy URL.

      If your proxy requires authentication, select the Advanced tab to enter your credentials.

    2. Enter the URL of the OpenText Core Performance Engineering server. You can copy the URL from the address bar of the browser in which you opened LoadRunner Cloud.

      For example, if the URL in the address bar of the browser is https://loadrunner-cloud.saas.microfocus.com/home/?TENANTID=208294383&projectId=1, copy the address https://loadrunner-cloud.saas.microfocus.com.

    3. Select a log level.

    Log level dialog box

  4. On the Git tab:

    The Git agent enables you to configure multiple repositories and repositories with multiple branches. For each repository or branch you want to add, click the Open button Open button to open the dialog box. Perform the following actions:

    1. Enter the repository URL.

      Tip: To configure credentials for a private repository, click Advanced. Enter your git username and password. Refer to your repository’s documentation for instructions on how to retrieve your credentials.

    2. Click Retrieve to retrieve all the branches.

    3. Select branches from the drop-down list.

    4. Click OK.

    Add repository dialog box

    Note: We recommend that you only configure a small number of repositories or branches on a single Git agent. Having many repositories or branches on a single Git agent can significantly impact performance when uploading and synchronizing. If you do need to use a large number of repositories or branches, we recommend that you use multiple Git agents to support them.

Launch the agent Go to Start > LoadRunner Cloud - Git agent > Start Git agent.

Back to top

Install a Docker container for the Git agent

To install a Docker container for a Git agent, do the following:

Action How to
Pull Docker image

Pull the Git agent Docker image from Docker Hub:

docker pull performancetesting/lrc_git_agent:latest

Launch a container

Launch the container in background (detached) mode using the following command:

docker run -d \
-e "STORM_TENANT=<tenant id>" \
-e "STORM_USERNAME=<username>" \
-e "STORM_PASSWORD=<password>" \
-e "STORM_PROJECT_ID=<project id>" \
-e "STORM_AGENT_NAME=<agent name>" \
-e "STORM_AGENT_CROSS_PROJECTS=<the flag to share agent across projects>" \
-e "STORM_GIT_REPO_URL=<git repository URL>" \
-e "STORM_GIT_REPO_BRANCH=<git repository branch>" \
--net=host performancetesting/lrc_git_agent

If you need to configure multiple branches or repositories, use the following command to provide details using a mounted volume:

docker run -d \
-e "STORM_TENANT=<tenant id>" \
-e "STORM_USERNAME=<username>" \
-e "STORM_PASSWORD=<password>" \
-e "STORM_PROJECT_ID=<project id>" \
-e "STORM_AGENT_NAME=<agent name>" \
-e "STORM_AGENT_CROSS_PROJECTS=<the flag to share agent across projects>" \
-v "<git agent workspace path>:/opt/gitworkspace" \
--net=host performancetesting/lrc_git_agent

Note:

  • In the <git agent workspace path> folder, add a configuration file named config.json (see the example below). If other Git-related files such as .gitconfig or .ssh are required, add them to this folder.

  • Read, write, and run permissions are required on the folder.

  • The target path /opt/gitworkspace is fixed. Using another path is not supported.

  • If you need to customize the repositories configuration file path (inside the container), add it as a value for the STORM_GIT_REPO_CONFIG parameter.

Configuration file

Enter the details about your repositories and branches as JSON code.

For example:

[
       {
             "url": "git@github.xyz.com:user/scripts.git",
             "branches": [
                    "branch1",
                    "branch2"
             ]
       },
       {
             "url": "https://user:token@github.com/user/scripts.git",
             "branches": [
                    "main"
             ]
       }
]

Environment variables

You can also pass environment variables using the --env-file command line parameter.

  • STORM_TENANT: Your Tenant ID [required]

  • STORM_USERNAME: Your LoadRunner Cloud username [required]

  • STORM_PASSWORD: Your LoadRunner Cloud password [required]

  • STORM_PROJECT_ID: Project ID (default value 1) [optional]

  • STORM_AGENT_NAME: Agent name [required]

  • STORM_AGENT_KEY: Agent key [optional]

  • STORM_AGENT_DESCRIPTION: Agent description [optional]

  • STORM_AGENT_CROSS_PROJECTS: The flag to share agent across projects [yes|no; default: no] [optional]
  • STORM_GIT_REPO_URL: Git repository URL [optional]

  • STORM_GIT_REPO_BRANCH: Git repository branch [optional]

  • STORM_GIT_REPO_CONFIG: Git repository configuration file path inside the container [optional]

If the agent needs to use a proxy, pass it using the https_proxy or http_proxy environment variable.

Back to top

Manage scripts in your Git repository

To manage scripts in your Git repository, select Assets > Scripts.

Do the following to add or update scripts from your Git repository to OpenText Core Performance Engineering:

Action How to
Access the Git repository

Click the Upload button Upload button and select Upload from Git to open the Git repository dialog box.

Note: For shared Git agents, if multiple users upload or synchronize scripts using the same agent simultaneously, the uploading or synchronizing time increases.

Select an agent

From the dropdown menus, select the agent, repository, and branch that connect to the script repository you want to use.

For details on managing your Git agents, see Agents.

If you want all the scripts that are uploaded from the repository to be configured for auto sync, select the Auto Sync check box. You can also individually configure scripts for auto sync. For details, see Sync Git scripts.

Select a script

Select one or more scripts from the Git repository. Click Add.

Sync Git scripts

You can sync Git scripts both manually and automatically.

To sync Git scripts manually:

  1. Turn on the Show Git only switch.

  2. Select the scripts you want to sync.

  3. Click the Sync button Sync button to sync your scripts with the Git repository.

Note: When you manually sync a Git script, runtime settings configured for the script in OpenText Core Performance Engineering are retained.

To sync Git scripts automatically:

Turn on the Auto sync switch for the scripts you want to be synced automatically.

When a change to a script is made in the repository and the script is automatically updated in OpenText Core Performance Engineering, a message is added in the notifications area in OpenText Core Performance Engineering.

Note: When you automatically sync a Git script, the runtime settings configured for the script in OpenText Core Performance Engineering are retained.

Tip: To see a list and view the status of your uploads and syncs, click the Notification button Notification button in the banner. The Notification pane provides a time stamp and other relevant information for each event. If you have new notifications, the number above the button indicates the number of unread items. To delete an upload notification, hover over it and click x.

Back to top

See also: