Cypress 13: Test Replay and Cypress Dashboard

--

Are you tired of spending countless hours debugging your tests? Look no further than Cypress version 13’s new feature: Test Replay. This game-changing addition, in conjunction with the Cypress Dashboard, will take your testing workflow to the next level.

In this blog post, we’ll explore what Test Replay is and how the Cypress Dashboard enhances your testing workflow.

What is Cypress Dashboard?

The Cypress Dashboard is a cloud platform that provides a comprehensive view of your test runs across different environments and browsers.

Below are some of the main features of Cypress Dashboard:

  • It provides a centralized platform to view detailed test results, including screenshots and videos, to quickly identify and analyze test failures.
  • Using Cypress Dashboard, you can run your test cases in parallel across multiple virtual machines in CI and save a lot of time.
  • It helps you gain a comprehensive view of your test suite’s health and performance over time.
  • It helps you find the flaky test in your code based on their frequency, and severity.
  • It provides you with a quick summary of errors occurring in your test. You can easily read the exact error message and understand how many tests are impacted by each error.

By default, It comes with 3 users and 500 runs for the free version but if you want to leverage more test runs, you can always switch to its paid version ( Here’s the pricing, you can choose based on the requirements)

You can configure it for multiple projects and record your test cases on Cypress cloud (Dashboard) to view the screenshots, and videos and even configure to check the flaky test cases.

It shows, which git branch you are using for running test cases in case you are running on CI/CD, just like shown below:

In addition, you also have the ability to configure it to monitor the slowest test runs in your project, as well as Flake Tests, Test Runs, and durations.

Simply navigate to the configuration option in the left side menu and customize it according to your specific requirements.

It also offers exceptional integration capabilities. You can easily integrate it with various tools like Github, Gitlab, BitBucket, etc.

Now that you have a clear understanding of what the Cypress Dashboard is, let’s move on to the next section and explore what Test Replay is.

Introducing Test Replay

Test Replay is a new game-changing feature introduced in Cypress version 13 that empowers you to conquer flaky and failing tests with ease during Continuous Integration (CI) runs.

  • It allows you to re-run specific test cases or scenarios, providing valuable insights into what went wrong during the test execution on CI/CD.
  • With Test Replay, you can pinpoint issues, debug failures, and make your test suite more robust and reliable.
  • This feature simplifies the debugging process, making it faster and more efficient, saving you time and effort.

The best part is that there is no additional cost to use this feature if you are already using Cypress Dashboard. Simply update your Cypress version to version 13.0 in your package.json file, and you can start using Test Replay right away.

Test Replay is compatible with all three types of testing, including E2E, API, and Component Testing. To access Test Replay, navigate to your project and then proceed to your test results.

Simply hover over any failed test cases, and you will notice the appearance of the Test Replay button, as illustrated below:

Upon clicking on the Test Replay button, a new window will appear, displaying the test execution along with the following details:

Operating System on which it is running

Browser Name

Test Case Name

Network Calls

Console

Inspect element

You have the flexibility to adjust the speed of test execution, allowing for better debugging and viewing capabilities.

Benefits of Test Replay:

Test Replay is a powerful tool that enables automation engineers and developers to identify and debug issues in their test suite quickly and efficiently. By re-running specific test cases or scenarios, Test Replay provides valuable insights into what went wrong during the test execution on CI/CD.

Here are some of the key benefits of using Test Replay:

Collaboration:

Test Replay makes it easier for team members to collaborate on debugging efforts. Since the test execution and results are captured, team members can easily share and discuss the details with each other.

Faster Debugging:

Test Replay reduces the time required for debugging by providing a detailed view of the test execution. This helps automation engineers/developers identify the root cause of the failure faster and take corrective action.

Improved Test Coverage:

By identifying and fixing flaky tests, Test Replay helps improve overall test coverage. This ensures that your application is thoroughly tested and reduces the risk of bugs in production.

Customizable:

Test Replay is customizable, allowing you to select which parts of the test execution you want to replay. This is particularly useful when dealing with long test cases or when you only need to replay a specific portion of the test.

If you would like to learn more about how to utilize this feature, you can watch the below video for a more comprehensive understanding.

Conclusion:

In conclusion, Cypress Dashboard is a powerful tool that can help you streamline your testing workflow and with the new TestReplay feature, you can easily debug failing tests. So, whether you’re running E2E, API, or Component Testing, Cypress Dashboard has got you covered

Thanks for reading. Happy Learning! AB

Ref — https://docs.cypress.io/guides/cloud/debugging/test-replay

Anshita Bhasin
Sr. Automation Engineer

GitHub | LinkedIn | Twitter | Youtube

--

--

Anshita Bhasin
Property Finder Engineering and Tech Blog

QA Chapter Lead at Proptech company in Dubai.. Here to share and learn new things! Youtube => ABAutomationHub