This article is about how to generate various reports in Cucumber and in case of failure how to attach screenshots with reports. Also about generating reports in CI environment.

Cucumber.io has developed a free cloud-based service for sharing reports. Cucumber reporting service allows to configure cucumber to publish results to the cloud which can be accessed from browser throughout the organization. This feature is greatly helpful while testing in CI environment.

Cucumber uses reporter plugins to produce reports that contain information about which scenarios have passed or failed.

Publishing to the Cucumber Reports service is currently supported in:

- Cucumber-JVM…


In this article we are going to see how to generate reports from Cypress test run. Cypress is built on top of mocha, so any reporter built with mocha can be used here.

Now we will see the steps involved to generate,

  1. junit .xml report
  2. mochawesome .html report

Let we first install required packages.

Generate Reports :

  1. junit — .xml report :

We want to generate multiple reports like junit-xml and a json.

To generate multiple junit reports, let we install

npm install — save-dev cypress-multi-reporters mocha-junit-reporter

Include below code in cypress.json

{
"screenshotsFolder":"TestResults/assets",
"reporter": "cypress-multi-reporters",
"reporterOptions"…


In this article we will see about how to run Cypress Tests in CI environment. Once we have created our Cypress project, we will maintain them in any VCS Repo(in our case GitHub). When there is a change in AUT functionality, obviously we need to change our test specs also. Once the changes are done we will update them in our Repos, integrate this Repo with Cypress Dashboard and on running Cypress tests, the results will be updated in Dashboard. These tests will be executed from a Jenkins job in CI/CD pipeline.

Here we use,

1. ​ VS Code as…


Cypress helps in automating end-to-end scenarios. Sometimes cypress test execution may ends in flaky test results. There are some behaviors that are hard to verify and make tests flaky (i.e., unreliable) and fail sometimes due to unpredictable conditions (eg., temporary breakouts in external dependencies, connectivity errors, etc.). Some other common race conditions that could result in unreliable tests include:

  • Resource dependencies availability
  • Connectivity issues
  • Animations
  • API calls
  • Backend Server availability

With test retries, Cypress is able to retry failed tests to help reduce test flakiness. Retries are very much helpful to in reducing continuous integration (CI) build failures.

How does…


In Cucumber we create many Feature files and each with many scenarios. To test any specific feature, we will run all the scenarios together from a Feature file from the Runner class.

What If we want to run a few selected scenarios from a Feature file?

Or, what if we want to run a few selected scenarios from different Feature files?

Here we use the option called Tags.

In this article we see in detail about,

  • What are Tags?
  • How to use Tags in Feature file?
  • How to use Tags in Runner class?
  • How to combine Tags using logical ‘AND’…


Cypress is a next generation front-end testing tool used to automate Unit Testing, Integration Testing, API Testing and especially End-to-End Testing. Even though every tester knows the advantages of End-to-end testing, they may not be interested in writing it. The reason is because it takes more time and needs more integration of several tools / frameworks to achieve End-to-End testing. Cypress is a wonderful tool which provides a testing platform to create End-to-End testing of modern web applications with minimal configuration and uses JavaScript for implementation.

Why Cypress?

As DevOps methodology evolved, nowadays we start testing from very early stages…

Anandhi K

Test Automation Consultant, Trainer and Blogger in Cypress, Selenium, Cucumber & CI/CD Tools. Having 15+ years of IT industry experience in various domains.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store