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

Suggestion: Report filter usage #1550

Closed
zivsha opened this issue Feb 24, 2019 · 8 comments
Closed

Suggestion: Report filter usage #1550

zivsha opened this issue Feb 24, 2019 · 8 comments

Comments

@zivsha
Copy link
Contributor

zivsha commented Feb 24, 2019

Description
When running the tests with any filters enabled, print the filter as part of the tests results.

Instead of this:
image

Have something like this:
image

@zivsha zivsha changed the title Report filter usage Suggestion: Report filter usage Feb 24, 2019
@horenmar
Copy link
Member

I like the idea.

@zivsha
Copy link
Contributor Author

zivsha commented Feb 28, 2019

@horenmar, if you want to give me some guiding points (since I never looked at the source code) maybe I can implement this and open a PR

@horenmar
Copy link
Member

Here are the basics:

  • Reporters are implemented in files in include/reporters/
  • There are two methods that can interest you from the reporter interface, testRunEnded and testRunStarted
  • Various reporters follow different convention and need different treatment.
    • I would probably skip CompactReporter
    • XMLReporter just needs a reasonable name for the tag
    • JunitReporter follows the JUnit standard (or at least our understanding of it). You would have to check if there is similar field in the JUnit XML standard, or at least a "comment" field or similar
    • ConsoleReporter looks good the way you proposed
    • TeamCity reporter uses the TeamCity format -- I am fairly sure that the format allows for arbitrary comments, but you'd have to check
    • AutoMake and TAP reporters: 🤷‍♂️

As for the testing and stuff, docs/contributing.md should be a reasonable overview.

@horenmar
Copy link
Member

horenmar commented Apr 5, 2019

This has been added to master.

@horenmar horenmar closed this as completed Apr 5, 2019
@johnthagen
Copy link

johnthagen commented Apr 16, 2019

@horenmar Just a idea, but should Filters: only be output when a filter is actually used?

After upgrading to 2.7.1 I was a little surprised to see yellow output at the top when I didn't set filters and all tests passed. I think it might be a nicer UX if Filters: is only printed if the filters are used.

Thoughts?

@horenmar
Copy link
Member

Its already fixed in master, but the release will have to wait until weekend.

@zivsha
Copy link
Contributor Author

zivsha commented Apr 16, 2019

@horenmar can you give a reference the commit that fixed this?

@horenmar
Copy link
Member

e99f1ef

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants