Ultimate Guide On GitLab CI Automation Testing Tool — Devstringx


  1. You must be familiar with the Selenium-Java concepts.
  2. You have an eclipse, JDK, maven, and git installed on your system.
  3. You should have a Gitlab account.
  1. Add dependencies within pom.xml.
  2. Create Base Driver Class
  3. Create Test Class
  4. Create a TestNG suite file
  5. Add plugins within XML
  6. Create GitLab yml file
  7. Run tests on GitLab pipeline

Step 1: Add Dependencies Within pom.xml

Step 2: Create Base Driver Class:

  1. setDriver method helps to add the browser instance to ThreadLocal webdriver using a hashmap.
  2. getDriver method helps to obtain the browser instance ID which has been stored in the ThreadLocal webdriver hashmap.

Step 3: Create Test Class

Step 4: Create a TestNG suite file

Step 5: Add plugins with the pom.xml file

Step 6: Create Gitlab yml file

  1. Stages
  2. Jobs
  3. Tags
  • Image is a reference to the docker image we added to the tag in the file.
  • The stage is the block that executes the code block per block
  • The script is a command that runs our code through CLI.

Step 7: Run tests on the Gitlab pipeline

  1. Log on to your GitLab account and open the automation project.
  2. Click the side panel ‘CI/CD’ and select the option ‘Pipeline’
  3. Click on the “Run Pipeline” option located at the top right corner
  4. Select your branch name and run the pipeline
  5. Next, you will see the pipeline being executed and check the status/progress bar.
  6. Following the run, the logs were captured in the pipeline results.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Devstringx Technologies

Devstringx Technologies


Devstringx Technologies is highly recommended IT company for custom software development, mobile app development and automation testing services