question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

junit reports are not logging failed testcase time in the generated xml files

See original GitHub issue

Hi, I have problems to get the built-in junit reporter working. Failed testcase time is not logged in generated junit xml files.

Current behavior:

  1. I am running multiple test files. Reports are getting generated for each specs. But if any tests are failing then in the report, test time is 0

image

In the attached xml snapshot for last test-suites, failure=1 but time=0. In the Test run, I can see it is taking 30 second, but why is it not logged in the generated junit xml report ?

image

Desired behavior:

Failed testcase proper time should be logged into generated junit xml file.

Steps to reproduce: (app code and test code)

  1. Add below configuration in cypress.json file
    "reporter": "junit",
  "reporterOptions": {
    "mochaFile": "cypress/reports/result-[hash].xml"
  1. Create any failed testcase
  2. Run the tests
  3. Check the time attribute in the the generated junit xml file

Versions

Cypress = 3.4.1 OS = Windows 10 Browser = chrome

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
keertyvermacommented, Oct 8, 2019

This report is generated by built-in reporter cypress option for junit. Is this not related with cypress then ?

0reactions
jennifer-shehanecommented, Jul 7, 2020

Unfortunately we have to close this issue due to inactivity. Please comment if there is new information to provide concerning the original issue and we can reopen.

Read more comments on GitHub >

github_iconTop Results From Across the Web

JUnit report is not showing my tests (#223132) - GitLab.org
Underlying issue seems to be that JUnit report files that are not well-formed xml or are not valid according to the "JUnit XML...
Read more >
JUnit test report is not parsed properly. : TW-17249 - YouTrack
Since upgrade to TC 6.5 JUnit XML test reports are not parsed correctly - all tests are shown as passed, while actually many...
Read more >
Unable to get hudson to parse JUnit test output XML
The problem is, whenever I tell ant to publish the JUnit test results, and then point it to either the raw test result...
Read more >
PublishTestResults@2 - Publish Test Results v2 task
Test result format. Default: JUnit. testResultsFiles: '**/TEST-*.xml' # string. Required. Test results files. Default: **/TEST-*.xml.
Read more >
Problems with test reports - SonarQube - Sonar Community
Hi, I am writing unit test using google test and generated xml file using mytest --gtest_output=xml:output.xml.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found