Meet 2025’s Top-rated Software Test Management Tool. Learn More >

How to run Selenium tests in Azure DevOps pipeline?

In this article

To run Selenium tests in an Azure DevOps pipeline, follow these steps:
1. Set Up Your Selenium Test Project
Ensure your Selenium tests are implemented in a framework (e.g., TestNG, JUnit for Java, or NUnit for .NET) and that all dependencies are included in the project.
2. Configure a Repository: Push your Selenium test project to a source control repository, such as Azure Repos, GitHub, or Bitbucket.
3. Create an Azure DevOps Pipeline: Go to the Azure DevOps project, navigate to Pipelines, and click New Pipeline. Select your repository and follow the prompts to configure the pipeline.
4. Define the YAML Pipeline: Use a YAML file to define the pipeline. Here’s an example for running Selenium tests in a Java project with Maven:

yaml
trigger:
branches:
include:
– main

pool:
vmImage: ‘ubuntu-latest’

steps:
– task: UseJava@1
inputs:
version: ’11’ # Adjust Java version as needed

– task: Maven@3
inputs:
mavenPomFile: ‘pom.xml’
mavenOptions: ‘-Xmx1024m’
goals: ‘test’

– script: |
echo “Starting Selenium tests…”
mvn clean test
displayName: “Run Selenium Tests”
For .NET projects, use a similar approach with dotnet test.

5. Add Browser Drivers: Install the required browser drivers (e.g., ChromeDriver, GeckoDriver) in your pipeline using scripts or tools such as Selenium.WebDriver.ChromeDriver for .NET or a Maven dependency for Java.

Example (Linux):
yaml
Copy code
– script: |
sudo apt-get install -y chromium-chromedriver
displayName: “Install ChromeDriver”

6. Handle Browser Testing Environment: If running headless browsers, configure the test settings to support headless mode:

java
ChromeOptions options = new ChromeOptions();
options.addArguments(“–headless”, “–disable-gpu”, “–window-size=1920,1080”);
WebDriver driver = new ChromeDriver(options)

Alternatively, integrate with a cloud platform such as BrowserStack or Sauce Labs for cross-browser testing.
7. Run and Monitor Tests: Save the pipeline and queue a build to execute your Selenium tests. Monitor the pipeline’s output for test results and debug any issues.
8. Publish Test Results: Use the “Publish Test Results” task to display test results in Azure DevOps:

yaml
– task: PublishTestResults@2
inputs:
testResultsFiles: ‘**/target/surefire-reports/*.xml’ # Adjust for your framework
testRunTitle: ‘Selenium Test Results’

How QA Touch Simplifies Selenium Testing in Azure DevOps Pipelines?

Looking for efficient test management while running Selenium tests in Azure DevOps pipelines? QA Touch integrates with Azure DevOps, enabling you to organize test cases, track execution, and generate detailed reports—all within a single platform. This integration ensures a streamlined testing process, improving collaboration between your QA and development teams.

Picture of Sridhar K

Sridhar K

All Posts

Deliver quality software with QA Touch

Questions? Explore our docs, videos, and more just one click away!

Real people with life changing results

Insights from QA Teams on QA Touch’s Impact

Frequently asked questions

Everything you need to know about the product and billing

Why QA Touch?

QA Touch is an AI-driven test management platform built by testers for testers. It simplifies collaboration between developers and QA engineers while helping to manage, track, and organize test cases efficiently. Streamline your testing processes, enhance QA visibility, and deliver high-quality software with ease.

QA Touch offers comprehensive features to manage the entire test management process. From easy migration with CSV files to audio-visual recording of issues and activity logs and a shareable dashboard for real-time reporting to stakeholders, we ensure the testing teams are always on top of things.

Our focus is on providing complete visibility and control over testing workflows and fostering collaboration between testers and other stakeholders (both internal and external). You can have a look at all the features here.

Once you sign up, it takes only 30 minutes to get your QA Touch account up and running. After registration, you will receive an account activation email with all the details. Log in with your account details and create your first test project on QA Touch—it’s that simple. You are now ready to start inviting your team and assigning them roles.

If you are finding it difficult to log in or facing any difficulty, feel free to reach our support team at info@qatouch.com

Why is QA Touch the best test management tool for me?

QA Touch is an AI-driven test management platform that simplifies collaboration between your developers and testers. Beyond creating, organizing, and executing test cases, QA Touch enables you to manage projects, track bugs, and monitor time—all in one platform.

With an intuitive UI and seamless two-way integrations, QA Touch adapts to your workflow, making test management, project oversight, and bug tracking smarter and more efficient.

With secure OKTA, Microsoft Azure SSO, and Google SSO enterprise features, you can stay connected in every app.

We have integrations with dozens of major apps like Slack, Jira, Monday.com, Cypress, and many more. Explore the whole list of integrations now supported here: Explore integrations

The test management tool is a modern software application that helps QA teams and developers manage their testing process efficiently. It provides a structured approach to creating, organizing, executing, and tracking tests to ensure software applications meet specified requirements and function properly before release.

Don’t just take our word for it.

QATouch is a leader in G2 market reports.