1

I've created a test using the samples. It works great. Test works really nice.

But I couldn't find about how can I send reports to an API after each test.

I want to post the reports like "Test Successfull and these are passed" or "Test Failed and these are failed things" + maybe upload also the screenshot it generates".

How can I do this?

  • 1
    Are you using CI to run the tests? Most CIs have test reporting built into them, and Cypress supports reporting test results in many different styles. https://docs.cypress.io/guides/tooling/reporters – agoff Mar 15 '22 at 13:30
  • @agoff Could you please give me more details because I didn't fully understand. How can I use reporters? Can I post report and screenshot with it? – Firat Yılmaz Mar 15 '22 at 15:22
  • 1
    By default, Cypress uses Mocha's `spec` reporter to report on test runs. If you're using CI to run your tests, there may be a specialized reporter for that CI. You'll have to do some other configuration to get screenshots and videos to report in your CI, and probably even more to get them associated with the specific test in the report. – agoff Mar 15 '22 at 15:26
  • 1
    Cypress has a workshop around getting comfortable using test reporters, I'd advise you to take a look at it. https://github.com/cypress-io/testing-workshop-cypress/blob/master/slides/09-reporters/PITCHME.md – agoff Mar 15 '22 at 15:30
  • @agoff I'm checking the documents now. But in order me to understand you better, can you tell me what is the meaning of CI ? I'm new with Cypress. Sorry for noob questions. – Firat Yılmaz Mar 15 '22 at 15:33
  • Continuous Integration - also called pipeline, builds, etc. Your tool might be Azure DevOps, Github/Github Actions, Jenkins, Teamcity, Travis, CircleCI, or any number of others. https://www.techtarget.com/searchsoftwarequality/definition/continuous-integration – agoff Mar 15 '22 at 15:37

0 Answers0