Run Datadog Synthetic Tests in Azure Pipelines | Datadog

Run Datadog Synthetic tests in Azure Pipelines

Author Aaron Kaplan

Published: September 30, 2022

Continuous integration (CI) demands continous testing: shifting left helps prevent faulty code from spreading, which is one of the core aims of CI. Datadog’s new Azure DevOps extension enables you to seamlessly incorporate integration and end-to-end tests into existing CI/CD workflows on Azure Pipelines, a dedicated CI/CD service that automatically runs builds, performs tests, and deploys your services and applications via cloud-hosted pipelines. By incorporating these tests using Datadog Synthetic Monitoring, you can bolster your shift-left strategy and proactively assess user experience at each step of your development process.

In this post, we’ll guide you through setting up the extension and implementing end-to-end tests in Azure Pipelines with our synthetic testing and monitoring solution.

Add synthetic tests to your existing Azure Pipelines

Datadog Synthetic Monitoring allows you to continuously assess the performance of your applications and services by running simulated user requests and actions from locations around the world. Synthetics enable you to use a single suite of tests in your production, staging, and development environments, in order to streamline your CI/CD processes and ensure a consistent user experience.

Incorporating Datadog Synthetic Monitoring in your Azure Pipelines environments is fast and code-free. Its simple-to-use interface enables anyone on your team, regardless of their coding experience, to create integration and end-to-end tests. The extension can be configured to test any URL at any and every point on your pipeline, including your QA, staging, pre-production, and production environments.

To begin, find the Datadog CI Extension in the Visual Studio marketplace and install it in your Azure organization. Next, create a Datadog CI service connection in your Pipelines project, and either input your API and application keys there or add them as secret variables in your Pipelines project.

Configuring tests in Azure Pipelines.
Configuring tests in Azure Pipelines.

You can then find and use the SyntheticsRunTests task in the pipeline tasks side panel of Azure Pipelines. Here, you can also configure complex tasks by adding custom start URLs, login credentials, and test data as variables. Doing so will apply these variables to all of the tests that you run in your pipeline. Alternatively, you can add custom variables on a test-by-test basis by providing a custom configuration file. Refer to the extension’s documentation for more information on configuring tasks.

Monitor Synthetic test results and CI pipeline performance in Datadog

Once you’ve set up the extension and configured some tests, you can use our CI Results Explorer to examine the results of those tests in Datadog. The explorer displays a status and duration for each test batch, as well as details on individual test runs, letting you compare the results of tests running in different browsers, devices, and locations. These results highlight issues such as regressions, broken features, or suboptimal application performance, helping you ensure that any faulty code is identified and corrected before it can make it to production.

Analyze test results in the CI Results Explorer.

For deeper insight into your CI pipelines themselves, Datadog CI Visibility uses key health and performance metrics to help you optimize your workflows. CI Visibility identifies high error rates, excessive build durations, flaky tests, and more, parsing pipeline performance by individual stages and jobs to help you zero in on snags and expedite troubleshooting.

Get started with Datadog Synthetic Monitoring for Azure Pipelines

With the Datadog CI Extension for Azure Pipelines, you can now easily incorporate Datadog Synthetic testing and monitoring into your CI pipelines in order to test your application workflows earlier and more frequently throughout the development process. Pairing Synthetic Monitoring with CI Visibility can deepen your insight by augmenting your integration and end-to-end tests with key pipeline performance metrics.

Datadog offers visibility solutions for a wide range of CI providers, with integrations for Jenkins, CircleCI, and GitHub Actions in addition to Azure Pipelines. You may also want to learn more about Datadog CI Visibility and incorporating Datadog Synthetic Monitoring in any kind of CI/CD pipeline. If you’re an Azure Pipelines user and an existing Datadog customer, download the Datadog CI Extension from the Visual Studio marketplace to get started with synthetic testing and monitoring in your pipelines today. Or, if you’re brand new to Datadog, use the extension with our .