cypress-io / cypress

Fast, easy and reliable testing for anything that runs in a browser.
https://cypress.io
MIT License
46.69k stars 3.16k forks source link

Cypress not reporting skipped test result in junit reporter #28450

Open PROJECTBUDDY21 opened 9 months ago

PROJECTBUDDY21 commented 9 months ago

Current behavior

Have generated Cypress result using 3 Types of Reporter, 1) Using mochawesome Here the result generated has skipped test specified in the report

image

2) 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)

image

3) 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"?>

` 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_
cypress-app-bot commented 3 months ago

This issue has not had any activity in 180 days. Cypress evolves quickly and the reported behavior should be tested on the latest version of Cypress to verify the behavior is still occurring. It will be closed in 14 days if no updates are provided.

PROJECTBUDDY21 commented 3 months ago

Yes, issue still exist.