Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cypress not reporting skipped test result in junit reporter #28450

Open
PROJECTBUDDY21 opened this issue Dec 3, 2023 · 2 comments
Open

Cypress not reporting skipped test result in junit reporter #28450

PROJECTBUDDY21 opened this issue Dec 3, 2023 · 2 comments
Labels
prevent-stale mark an issue so it is ignored by stale[bot] topic: reporters 📄 type: unexpected behavior User expected result, but got another

Comments

@PROJECTBUDDY21
Copy link

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

  1. 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

  1. 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

@cypress-app-bot
Copy link
Collaborator

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.

@cypress-app-bot cypress-app-bot added the stale no activity on this issue for a long period label Jun 1, 2024
@PROJECTBUDDY21
Copy link
Author

Yes, issue still exist.

@cypress-app-bot cypress-app-bot removed the stale no activity on this issue for a long period label Jun 2, 2024
@jennifer-shehane jennifer-shehane added prevent-stale mark an issue so it is ignored by stale[bot] topic: reporters 📄 type: unexpected behavior User expected result, but got another labels Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prevent-stale mark an issue so it is ignored by stale[bot] topic: reporters 📄 type: unexpected behavior User expected result, but got another
Projects
None yet
Development

No branches or pull requests

3 participants