Is the Cypress Dashboard right for you?

Cypress is an open-source end-to-end testing framework written in JavaScript and released for free under the MIT license.

In no way are you required to pay to use the tool, write or run your tests (locally or remotely), or to make use of your own custom reporting solution. If you want to use additional tools like mocha-awesome, go right ahead.

And as a test automation tool, it is one of the most popular and widely used for testing the latest generation of web applications released today. Not only because it uses the language of the web (JavaScript) and is crazy fast. But also because of its easy-to-use API, amazing built-in features that allow you to travel back in time to see failures in an application at the point of their discovery. But it also saves time by integrating with multiple CI environments. Enabling developers to ship features faster and get quick feedback on overall software quality. There’s nothing worse than shipping additional features to discover that it had a negative impact on another part of your codebase.

I’ve been using Cypress exclusively for a while now. But I’ve been missing a way to analyse my test execution statistics in a centralised location. Having to rely on several custom tools, which although work. Still don’t provide all the statistics and insights that I would like.

I’d like to preface this by saying that although Cypress itself is free. The Cypress Dashboard is a paid service that is not required for Cypress to operate. However, it is an interesting product in its own right that provides many features ‘out of the box’ that some people might not have time to configure themselves.

So let’s go into these and conclude on whether it is something that fits your needs.

What is Cypress dashboard?

If you are using Cypress within a Continuous Integration environment, or as part of a pipeline that runs your tests every time new code is pushed. Then I’m going to assume that you are either using a reporting tool already, or need a tool to provide you with various statistics and information related to your automated testing.

This is where the Cypress Dashboard fits in. Not only does it provide you with visibility into your tests running within your pipeline. But it also gives you easy access to various valuable features such as:

  • Screenshots and videos of your test executions and failures.
  • Integration with Slack & GitHub
  • Analytics such as test execution times for your tests, tests with the highest failure rates and whether tests were run in parallel.
  • The ability to group tests and use tags to identify executions.

We can get a lot of these statistics through extra configuration within our pipelines to publish these artifacts if we so wish (take a look at the Cypress Kitchen sink for inspiration).

So the question then becomes, ‘Is the dashboard worth the effort to set up and pay for?’

How can I get started with the Cypress dashboard?

To answer the first part of the above question. Luckily the Cypress team has made their Dashboard service as easy to set up and integrate with your existing tests a straightforward process.

You only need to register a new account and associate your existing project by the means of a unique run key and projectId within your cypress.json.

For example:

cypress run --headless --browser chrome --record --key xxx

Once this has been done, you will see your test runs show up inside your Dashboard account and be able to interact with them and view the captured screenshots and videos with no additional configuration.

If you want to group your tests into distinct sets or tag them with environmental information to make the process of studying their analytics simpler. All you need to do is all the following tags to your scripts:

--group xxx

--tag xxx

Would you recommend it?

For the latter part of the above question. I would say that the access you get to the analytics of your test executions is worth the investment alone. As an automation engineer, I know that my job is never done when I ship my code. There’s going to be ongoing optimization and maintenance needed to ensure my scripts are the best solution as the product continues to evolve. Without easy access to data on how fast my tests are running, or the ones which are more likely to fail based on past results. It makes the step of optimization that bit harder.

There are many ways around that problem and things you can do to pull the statistics you need. But the time taken to set that up is the time taken away from you being a productive member of the testing team.

So you should be asking yourself, ‘Is my time worth being spent on something that I can build myself. Or is it better to use a pre-built tool that will do everything I need?’

There is no blanket answer here, and it’s one that you must consider before dedicating yourself to one solution over another.

Either way, I think we can all agree that the Cypress Dashboard is a great accompaniment to the test framework and is worth at least investigating to see if it’s a solution that will work for your particular needs.

If you decide to at least check it out, you also get to enjoy a free period in which you can try the service. So what do you have to lose?

I hope this blog post was useful to you.

Reach out to me on LinkedIn or Twitter if you have any questions. Or contact me using my contact form.

PS: I also send out a weekly newsletter which contains links to articles I’m reading, the books I’m enjoying. And other interesting content. Sign-up here if you’re interested. It’s free!

Posted by Kevin Tuck

Kevin Tuck is an ISTQB qualified software tester with nearly a decade of professional experience. Well versed in creating versatile and effective testing strategies. He offers a variety of collaborative software testing services. From managing your testing strategy, creating valuable automation assets, or serving as an additional resource.

Leave a Reply