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.

Reporter - the file (filename) property is undefined

See original GitHub issue

Current behavior:

When I use junit or any other reporter the file property of the suite object from the runner.on('suite', function(suite) {}) listener is undefined.

Desired behavior:

The file property of the suite should be the name of the file which contains the given test suite.

How to reproduce:

In the example below I used junit reporter, but it can be reproduced with any reporter which contains filename in their report.

cypress run --spec [spec_file].js --reporter junit or cypress run --reporter junit

Bug: The generated report doesn’t contain the file property.

Expected: You should have a file on the generated report.

Additional Info (images, stack traces, etc)

Suite object from the reporter:

image

Generated report without filename:

image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:7
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
wrsewardcommented, Jul 11, 2018

Having this same issue as well.

This would be great to have as part of CircleCI test parallelization timings, as it requires the filenames to be present.

0reactions
cypress-bot[bot]commented, Jan 24, 2020

Released in 3.8.3.

This comment thread has been locked. If you are still experiencing this issue after upgrading to Cypress v3.8.3, please open a new issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot read property 'Base' of undefined error using mocha ...
I was able to use mocha-allure-reporter by simply installing it (along with mocha), npm install mocha mocha-allure-reporter.
Read more >
file-loader - webpack - JS.ORG
Specifies a Regular Expression to one or many parts of the target file path. The capture groups can be reused in the name...
Read more >
Configuration File - Karma
The Karma configuration file can be written in JavaScript, CoffeeScript, ... Set property name to required MIME, provide Array of extensions (without dots) ......
Read more >
Configuration File | API | Docs - TestCafe
To save a report to a file, pass an object whose name property specifies the reporter name and output property specifies the path...
Read more >
Cannot read properties of undefined (reading'value')
The problem is in the FileName property, if you use a local variable to get the name of the loaded file then you...
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