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

ConsoleLauncher: warn when using --select-class with a class that is not accepted by the --include-classname rules #2259

Closed
fredlund opened this issue Apr 15, 2020 · 3 comments · Fixed by #2270

Comments

@fredlund
Copy link

When using the ConsoleLauncher to execute tests in a class FirstTesterMon.java, selected by the option --select-class, no tests were found. This is correct, as I had not specified any --include-classname nonstandard rule.

However, it would have been really helpful to get a warning message in the style of:
WARNING: you have specified to scan a class FirstTesterMon; however this class will NOT be scanned due to the rules for classname scanning. Consider specifying a --include-classname rule.

Or alternatively, and perhaps more sane: if a class is specified using --select-class always scan it even if the name does not match the --include-classname rules.

@sormuras
Copy link
Member

Related to #733:

[...] that --select-method should by-pass the --include-classname is valid. Same goes to classes passed via --select-class. Both should be included, even if the active "include pattern" does not match.

@sbrannen
Copy link
Member

sbrannen commented Apr 17, 2020

Tentatively slated for 5.7 M2 solely for the purpose of team discussion

@marcphilipp
Copy link
Member

Team decision: Add explicitly selected classes from --select-class and --select-method to the include patterns passed when constructing the ClassNameFilter so that these would always be executed regardless of the implicit or explicit class name filter.

@juliette-derancourt juliette-derancourt self-assigned this Apr 23, 2020
juliette-derancourt added a commit that referenced this issue May 2, 2020
Add explicitly selected classes from `--select-class` and `--select-method` to the include patterns passed when constructing the `ClassNameFilter` so that these are always executed regardless of the implicit or explicit class name filter.

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

Successfully merging a pull request may close this issue.

5 participants