GitLab integration
The Test Execution GitLab integration enables you to trigger tests on an OpenText Enterprise Performance Engineering server, monitor the tests, generate analysis or trend reports, and check the report status. The tests can be pre-existing ones or defined in a YAML file in the GitLab repository.
Component capabilities
This component supports test execution and workspace synchronization for OpenText Enterprise Performance Engineering.
ExecuteLreTest action
When you run ExecuteLreTest, the container:
-
Authenticates with an OpenText Enterprise Performance Engineering server.
-
Triggers a performance test execution.
-
Allocates or reuses a timeslot, based on your configuration.
-
Monitors test execution until completion.
-
Optionally collates and analyzes results.
-
Writes logs and result artifacts to configured directories.
-
Exits with a deterministic status code for pipeline gating.
WorkspaceSync action
Note: WorkspaceSync is a technology preview.
The WorkspaceSync action synchronizes test assets from your repository to the server. When executed, the container:
-
Authenticates with an OpenText Enterprise Performance Engineering server.
-
Scans your workspace for supported script folders:
-
VuGen scripts (folders containing a .usr file).
-
JMeter scripts (folders containing a .jmx file).
-
Gatling scripts (folders containing a .scala file).
-
Selenium or unit test scripts (folders containing a .java file).
-
DevWeb scripts (folders containing both main.js and rts.yml files).
-
-
Zips each detected script folder and uploads it to the project.
-
Applies failure handling rules:
-
If 5 consecutive uploads fail, the action stops with failure.
-
If more than 50% of detected scripts upload successfully, the action reports success.
-
Otherwise, the action reports failure.
-
-
Writes upload logs to the console and workspace.
-
Exits with a deterministic status code for pipeline gating.
Incremental workspace synchronization
Incremental synchronization is supported starting with v0.1.10.
-
Default behavior: The component identifies the last successful pipeline SHA and synchronizes only modified files.
-
First successful run: A full synchronization is performed.
-
Fallback behavior: If the baseline SHA cannot be determined, the component defaults to a full synchronization.
Note: Starting from v0.1.8, this integration is published as an official GitLab CI/CD Catalog component.
Prerequisites
This section lists the requirements for using the GitLab CI/CD component.
Option 1: Use the component
This is the recommended option for v0.1.8 and later. No installation is required. The v0.1.8 release includes:
-
Precompiled Java JAR with dependencies
-
Compiled TypeScript entry point (app.js)
-
All runtime dependencies in registry.gitlab.com/loadrunner-enterprise/lre-gitlab-action:v0.1.8
Pin your component to a specific release tag, for example @v0.1.8, to keep your pipeline reproducible.
Option 2: Use a custom GitLab runner
If you do not use the component image, your GitLab runner must include:
-
Java 17 or later (JRE is sufficient).
-
Node.js 25 or later.
-
npm and npx.
-
Permission to run these commands. Use sudo configuration only if the runner user does not have the required PATH access.
If needed, you can define sudo permissions for gitlab-runner with the following command:
sudo visudo
Add this entry:
gitlab-runner ALL=(ALL) NOPASSWD: /usr/bin/npm, /usr/bin/npx, /usr/bin/node, /usr/bin/java
Quick start
Use the following examples to add the component to your .gitlab-ci.yml file.
ExecuteLreTest action
include:
- component: gitlab.com/loadrunner-enterprise/lre-gitlab-action/lre@v0.1.8
inputs:
lre_server: "$LRE_SERVER"
lre_domain: "$LRE_DOMAIN"
lre_project: "$LRE_PROJECT"
lre_test: "Subject/MyTest"
lre_username: "$LRE_USERNAME"
lre_password: "$LRE_PASSWORD"
WorkspaceSync action
include:
- component: gitlab.com/loadrunner-enterprise/lre-gitlab-action/lre@v0.1.10
inputs:
lre_action: "WorkspaceSync"
lre_server: "$LRE_SERVER"
lre_domain: "$LRE_DOMAIN"
lre_project: "$LRE_PROJECT"
lre_username: "$LRE_USERNAME"
lre_password: "$LRE_PASSWORD"
lre_workspace_dir: "$CI_PROJECT_DIR/scripts"
lre_workspace_sync_success_threshold: "50"
# Optional explicit baseline SHA for incremental synchronization.
# If omitted, the action uses the last successful pipeline SHA.
# lre_workspace_sync_base_sha: "$CI_COMMIT_SHA"
# Optional deletion of scripts removed from the repository during incremental synchronization.
lre_workspace_sync_delete_removed_scripts: "false"
sync-workspace:
extends: .lre-run
variables:
GIT_STRATEGY: fetch
GIT_DEPTH: "0"
GITLAB_TOKEN: "$LRE_GITLAB_TOKEN"
For advanced customization, turn off the default lre-run job and define your own job that extends .lre-run:
lre-run:
rules:
- when: never
run-lre-test:
stage: test
extends: .lre-run
artifacts:
paths:
- LreResult/
- logs/
expire_in: 7 days
Set sensitive CI/CD variables, for example LRE_USERNAME and LRE_PASSWORD, as masked variables in Settings > CI/CD > Variables.
Action inputs
This section lists the required and optional input parameters for the component.
Required parameters
The following table lists the required input parameters.
|
Input |
Description |
Action |
|---|---|---|
|
lre_server |
Server, port (default 80 or 443 for secure), and tenant. If no tenant is provided, the default tenant is Example:
|
Both |
|
lre_username |
Username, or the ID part of a token. |
Both |
|
lre_password |
Password, or the secret part of a token. |
Both |
|
lre_domain |
Domain (case sensitive). |
Both |
|
lre_project |
Project (case sensitive). |
Both |
|
lre_test |
Required only when lre_action=ExecuteLreTest. Use a valid test ID, or a relative path to a YAML file in the workspace that defines test creation. |
ExecuteLreTest |
Use either username and password authentication, or token authentication.
Optional parameters
The following table lists the optional input parameters.
|
Input |
Description |
Action |
Default |
|---|---|---|---|
|
lre_action |
Action to trigger. Supported values are ExecuteLreTest and WorkspaceSync. |
Both |
ExecuteLreTest |
|
lre_description |
Description of the action shown in logs. |
Both |
Not set |
|
lre_https_protocol |
Use secure protocol for server connection (true or false). |
Both |
true |
|
lre_authenticate_with_token |
Use token authentication, which is required when SSO is configured, with true or false values. |
Both |
false |
|
lre_workspace_dir |
Local workspace root path. For WorkspaceSync, this directory is scanned for scripts and stores logs under <workspace>/logs. |
Both |
If omitted, it is resolved with lre_output_dir. If both are omitted, ./ is used. |
|
lre_test_instance |
AUTO or a specific instance ID. |
ExecuteLreTest |
AUTO |
|
lre_timeslot_duration_hours |
Timeslot duration in hours. |
ExecuteLreTest |
0 |
|
lre_timeslot_duration_minutes |
Timeslot duration in minutes. |
ExecuteLreTest |
30 |
|
lre_post_run_action |
Post-run action. Values: Collate Results, Collate and Analyze, Do Not Collate. |
ExecuteLreTest |
Do Not Collate |
|
lre_vuds_mode |
Use VUDS licenses with true or false values. |
ExecuteLreTest |
false |
|
lre_trend_report |
Use ASSOCIATED to use the trend report from the test design, or provide a valid report ID. If omitted, trend monitoring is not used. |
ExecuteLreTest |
Not set |
|
lre_proxy_out_url |
Proxy URL. |
Both |
Not set |
|
lre_username_proxy |
Proxy username. |
Both |
Not set |
|
lre_password_proxy |
Proxy password. |
Both |
Not set |
|
lre_search_timeslot |
Search for a matching timeslot instead of creating a new timeslot with true or false values. |
ExecuteLreTest |
false |
|
lre_status_by_sla |
Report success based on SLA with true or false values. |
ExecuteLreTest |
false |
|
lre_output_dir |
Directory used to read the checkout folder and save results. Use $CI_PROJECT_DIR when needed. |
ExecuteLreTest |
./ |
|
lre_runtime_only |
Scripts upload mode for WorkspaceSync: true uploads runtime files only; false uploads all files. |
WorkspaceSync |
true |
|
lre_workspace_sync_success_threshold |
Workspace Sync success threshold for the WorkspaceSync action is 0 to 100. A value of 0 means synchronization does not fail based on upload ratio. A value of 100 requires all uploads to succeed. Out of range values use 50. |
WorkspaceSync |
50 |
|
lre_workspace_sync_base_sha |
WorkspaceSync only. Optional explicit base commit SHA used to compute changed files for incremental synchronization. |
WorkspaceSync |
Not set |
|
lre_workspace_sync_delete_removed_scripts |
WorkspaceSync only. If true, incremental synchronization also deletes scripts in OpenText Enterprise Performance Engineering when script folders are removed from the repository. |
WorkspaceSync |
false |
|
lre_enable_stacktrace |
Show stack trace details for errors with true or false values. |
Both |
false |
Example
This section illustrates running a test and generating reports using the actions described above.
The example below:
-
Authenticates using the token provided by the user.
-
Creates a load test based on the YamlTest/createTestFromYaml.yaml file from the Git repository.
-
Runs the test.
-
Waits for the analysis and trending to complete and download the reports.
-
Uploads the reports to the build artifact.
stages:
- test
variables:
lre_description: "my lre test execution"
# lre_server: "mylreserver" #value provided as CI/CD variable
lre_https_protocol: true
lre_authenticate_with_token: true
# lre_domain: "MYDOMAIN" #value provided as CI/CD variable
# lre_project: "myproject" #value provided as CI/CD variable
lre_test: "YamlTest/createTestFromYaml.yaml"
lre_test_instance: "AUTO"
lre_timeslot_duration_hours: 0
lre_timeslot_duration_minutes: 30
lre_post_run_action: "Collate and Analyze"
lre_vuds_mode: false
lre_trend_report: "ASSOCIATED"
lre_status_by_sla: false
lre_enable_stacktrace: true
lre_output_dir: "$CI_PROJECT_DIR"
RELEASE_TAG: "latest" # Default value for manual runs, to be overridden
# The following commented-out section is not required if your gitlab runner is already configured to have them
# Otherwise you will need to have them installed manually or installed by the following commands
# (which will require the sudoers to provide permission to gitlab-runner)
# before_script:
# - apt-get update -qq
# - apt-get install -y openjdk-11-jdk curl
# - curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
# - apt-get install -y nodejs
test-release:
stage: test
script:
- if [ -z "$RELEASE_TAG" ]; then echo "No RELEASE_TAG specified. Exiting."; exit 1; fi
- echo "Testing release $RELEASE_TAG"
- URL="$CI_PROJECT_URL/-/jobs/artifacts/$RELEASE_TAG/raw/release/release-package.zip?job=package"
- echo "Downloading from $URL"
- curl --location --output release-package.zip "$URL"
- echo "Downloaded file details:"
- ls -lh release-package.zip
- file release-package.zip
- mkdir release # Create a release directory
- unzip release-package.zip -d release # Extract contents into the release directory
- echo "List of files extracted from release-package.zip:"
- ls -l release # List files in the release directory
- cd release
- node app.js
artifacts:
paths:
- LreResult/
when: manual # Allow manual triggering
allow_failure: false
The contents of the YAML file are shown below.
##################################################
group:
- group_name: "demo_script_new"
vusers: '2'
#script_id: 175
script_path: "daniel\\scripts\\demo_script_new"
lg_name:
- "LG1"
scheduler:
rampup: '10'
duration: '60'
automatic_trending:
report_id: 6
max_runs_in_report: 3
##################################################

