Integration Cypress with Azure DevOps: Publishing test videos in your Pipeline

Integration Cypress with Azure DevOps: Publishing test videos in your Pipeline

Cypress is a front end test automation tool used for regression testing web applications. It is based in JavaScript and integrates seamlessly with many continuous integration tools, making it a great choice for automating tests.

I’ve been studying Cypress for a while now, especially it is integration with Azure DevOps. In this post, I will share how to publish videos from Cypress tests on Azure DevOps.

Let’s go!🚀

First of all, make sure your tests are in a **Git repository (“Repos”) **in Azure DevOps.

Next, in your Cypress test code, you need to configure the settings in the “cypress.config.js” file as follows:

// cypress.config.js

module.exports = {
video: true,
videosFolder: ‘cypress/videos’
};

Now, navigate to Pipelines. If you already have a configured pipeline, locate it and click on Edit to make changes.

After that, in your pipeline editor within Azure DevOps, navigate to Tasks and use the search bar to find the task named “publish build artifacts”.

Now, you’ll configure the task:

Set the Path to publish to specify where the artifact files will be stored in Azure.
Specify the Artifact name to give a name to your artifact.
Leave the Artifact publish location as default, normally set to “Azure Pipelines”.

After configuring these settings, click on Add to add the task to your pipeline.

Now the configuration has been added to the azure-pipeline.yml file.


Once you have saved the azure-pipeline.yml file, initiate the test build by clicking on “Run Pipeline” in Azure DevOps. This action will start the CI/CD pipeline and execute the defined tasks, including a new configuration for video recording.

After running the test, navigate to the “Summary” and look for the information indicating “1 published artifact” and click on it.

This artifact contains the test recording.


By following these steps, you will use video recordings for better test analysis and debugging when necessary!

If you found this article helpful, please leave a comment.❤️

Leave a Reply

Your email address will not be published. Required fields are marked *