Playwright with Azure Devops Pipeline (Self-hosted) and Slack notification

Ploy Thanasornsawan
8 min readJan 14, 2025

My test case involves using the Playwright JavaScript API for a book management application. The tests require a GraphQL server running in the background to handle requests and responses.

As a QA automation engineer, it’s our job to make sure everything works smoothly. To keep things in check, we rely on CI/CD pipelines to track test results. In this case, we’re setting up an Azure DevOps pipeline to handle it.

Considering cost efficiency, we’ll run the Azure pipeline on a self-hosted agent (local machine). This approach not only reduces costs compared to Microsoft-hosted agents but also provides performance benefits such as:

  • Reduced queue times since the pipeline runs directly on the local agent.
  • Faster builds due to the ability of self-hosted agents to cache dependencies, Docker layers, or large files locally, eliminating the need to start from scratch or wait in a queue during peak times.

The Azure DevOps pipeline structure will include:

  1. Starting the GraphQL server (Apollo Server).
  2. Running the Playwright tests against the server.
  3. Storing the test results as an artifact in the pipeline.
  4. Reporting the test results…

--

--

Ploy Thanasornsawan
Ploy Thanasornsawan

No responses yet