Skip to content

GitLab CI


GitLab CI is a tool to automatically build your software through continuous deployment. GitLab CI is nothing else than an command-line runner built which runs your own scripts inside Docker containers.

OctoPerf seamlessly integrates with GitLab CI thanks to our Maven Plugin. You can run OctoPerf load tests as part of your software builds like:

  • Run an existing scenario,
  • Import and run a JMeter JMX stored in your git repository,
  • Or even stop the build automatically whenever a threshold or SLA exceeds a certain criticality (Example: WARNING).



In order to setup gitlab builds to run OctoPerf load tests, first you need:


GitLab Repo

First, you need to:

  • Create a GitLab account,
  • Then create a new repository named octoperf-ci.

Next, you will need an OctoPerf Account. Now, let's setup a dummy project:

  • Create a new project named GitLab in your Default workspace,
  • Import the sample JMX. This should create an virtual user,
  • Create a Scenario named Scenario and configure the load settings for the user.

Now, it's time to save your API key for further use:

  • Click in the top-right corner in OctoPerf UI and choose Profile in the menu,
  • Copy the API Key.

Let's setup the gitlab repository now.

GitLab Repository

GitLab CI easily supports running Maven builds:

  • First, clone the gitlab repository:
git clone
  • Then, you should create the maven pom.xml config file which contains:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns=""


      <name>OctoPerf Releases</name>
      <name>OctoPerf Snapshots</name>

Make sure to replace YOUR_API_KEY by your account API Key.

  • Then, create a .gitlab-ci.yml file at the root of your project:
image: maven:latest

    - .m2/repository/
    - target/

  stage: test
  when: manual
    - mvn octoperf:execute-scenario

This will execute an existing scenario named Scenario, expected to be in your account GitLab project and Default workspace.

  • Commit those changes to your repository:
git add -A && git commit && git push

Which will push the 2 files to your git repository:

[master (root-commit) 8d8794b] OctoPerf Load Test
 2 files changed, 51 insertions(+)
 create mode 100644 .gitlab-ci.yml
 create mode 100644 pom.xml
Enumerating objects: 4, done.
Counting objects: 100% (4/4), done.
Delta compression using up to 12 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 894 bytes | 894.00 KiB/s, done.
Total 4 (delta 0), reused 0 (delta 0)
 * [new branch]      master -> master
  • The CI Job should now be visible on GitLab,

GitLab Job

  • Now click on Run Pipeline to trigger a new build. After a while, the test should start:

GitLab Build Running

Congratulations! You've just triggered a load test on OctoPerf using GitLab CI and OctoPerf Maven Plugin.

GitLab Build Running On OctoPerf

The analysis report is visible in OctoPerf too. For further information, see our OctoPerf Maven Plugin documentation.