Playwright with Azure Devops Pipeline (Self-hosted) and Slack notification
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:
- Starting the GraphQL server (Apollo Server).
- Running the Playwright tests against the server.
- Storing the test results as an artifact in the pipeline.
- Reporting the test results…