-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
More verbosity when no tests are run #2179
Comments
Both Surefire and Gradle assume that tests are contained within a class and use `ClassSelector` to discover tests in these classes. Cucumber uses plain text files. By using a class annotated with `@Cucumber` we work around this behaviour. Cucumber will then scan the package and sub-packages of the annotated class for feature files. When using this system, in case of misconfiguration it is not immediately clear if the test engine is not picked up or if the location of the feature files and annotated class do not line up. While we can not generically log a warning in case a discovery selector did not find any features, we can log a warning in this special case. It is clear that the intend was to put feature files in the package. Otherwise the annotated class could/should be removed to suppress this warning. Fixes: #2179
Both Surefire and Gradle assume that tests are contained within a class and use `ClassSelector` to discover tests in these classes. Cucumber uses plain text files. By using a class annotated with `@Cucumber` we work around this behaviour. Cucumber will then scan the package and sub-packages of the annotated class for feature files. When using this system, in case of misconfiguration it is not immediately clear if the test engine is not picked up or if the location of the feature files and annotated class do not line up. While we can not generically log a warning in case a discovery selector did not find any features, we can log a warning in this special case. It is clear that the intend was to put feature files in the package. Otherwise the annotated class could/should be removed to suppress this warning. Fixes: #2179
Both Surefire and Gradle assume that tests are contained within a class and use `ClassSelector` to discover tests in these classes. Cucumber uses plain text files. By using a class annotated with `@Cucumber` we work around this behaviour. Cucumber will then scan the package and sub-packages of the annotated class for feature files. When using this system, in case of misconfiguration it is not immediately clear if the test engine is not picked up or if the location of the feature files and annotated class do not line up. While we can not generically log a warning in case a discovery selector did not find any features, we can log a warning in this special case. It is clear that the intend was to put feature files in the package. Otherwise the annotated class could/should be removed to suppress this warning. Fixes: #2179
Would this help:
Depends a bit on your tooling where this ends up. |
Both Surefire and Gradle assume that tests are contained within a class and use `ClassSelector` to discover tests in these classes. Cucumber uses plain text files. By using a class annotated with `@Cucumber` we work around this behaviour. Cucumber will then scan the package and sub-packages of the annotated class for feature files. When using this system, in case of misconfiguration it is not immediately clear if the test engine is not picked up or if the location of the feature files and annotated class do not line up. While we can not generically log a warning in case a discovery selector did not find any features, we can log a warning in this special case. It is clear that the intend was to put feature files in the package. Otherwise the annotated class could/should be removed to suppress this warning. Fixes: #2179
Was a gradle build and I ran with the --info flag. I haven't seen that warning. |
That's expected. I just added it. 😄 I wanted to know if it would have helped or if the message might not be informative enough. Did you see the INFO log lines anywhere? The error message would be printed in the same place. |
Seems like it would be very usefull. And yes, I saw the info messages, I believe. |
Can you try v6.9.1? |
I used a lot of time today trying to find out why my features wouldn't run. I thought cucumber junit engine wasn't been discovered, but it turned out I had my folders messed up.
What I was missing was some output saying "I was looking in folder X for features, but found none" or "couldn't find any class annotated with X" to point me in the right direction.
I think this should be something it should output just like it outputs the publish stuff.
This improvement would be a lot of help to anyone who is new to cucumber or the junit 5 way of setting it up.
The text was updated successfully, but these errors were encountered: