Search code examples
cypressui-automationcypress-cucumber-preprocessor

How to get cypress run result for each test?


I want to integrate cypress report with an internal tool and I was able to achieve by using after:run, which posts data by iterating over result Json, but I'm looking for something which will allow me to capture the execution result after each test case has ran and push it to internal tool. Similar to after each hook.

Is there any way I can achieve this?

------Update--------

Was able to achieve it by using mocha custom reports


Solution

  • Here is the solution I was looking

    https://mochajs.org/api/tutorial-custom-reporter.html

    I used mocha listeners to trigger an API call to post data.