Description
Current behavior
Have generated Cypress result using 3 Types of Reporter,
- Using mochawesome
Here the result generated has skipped test specified in the report
- Using mocha-junit-reporter
This JUnit report only report total test and failures , but doesn't specify what happened to other test cases (skipped, pending)
- Using cypress-multi-reporters
This has similar behavior to point 2, as another type of JUnit reporter
Desired behavior
Similar to mochawesome reporter which has generated result in JSON has provided metrics for skipped and pending.
Cypress should also be able to support other metrics ( skipped and pending) in case of JUnit.
As it becomes difficult to analyze what exactly happened with remaining test cases.
Eg: In this scenario I have a total of 2 test cases and one before block. If my before hook fails, remaining test will get skipped, but in JUnit reporter scenario the result will be
<?xml version="1.0" encoding="UTF-8"?> <testsuites name="Mocha Tests" time="0.525" tests="2" failures="1"> <testsuite name="Root Suite" timestamp="2023-12-03T14:43:47" tests="0" file="cypress\e2e\spec.cy.js" time="0.000" failures="0"> </testsuite> <testsuite name="template spec" timestamp="2023-12-03T14:43:47" tests="2" time="0.515" failures="1">
Here it shows tests=2 and failures=1 , but nothing about the remaining tests, if those were passed/failed/skipped/pending, etc;
If we have a clear result for those as well, it will show overall scenario of what happened with our test suites.
Test code to reproduce
https://github.com/PROJECTBUDDY21/cypress-reporter-sample/tree/feature/cypress-junit-mocha-reporter
Cypress Version
13.6.0
Node version
20.10.0
Operating System
Windows 10
Debug Logs
No response
Other
No response
Activity