-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JUnit Platform] Warn if feature files could not be found (#2182)
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
- Loading branch information
1 parent
156db1f
commit 36e8dee
Showing
5 changed files
with
60 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...latform-engine/src/test/java/io/cucumber/junit/platform/engine/nofeatures/NoFeatures.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package io.cucumber.junit.platform.engine.nofeatures; | ||
|
||
import io.cucumber.junit.platform.engine.Cucumber; | ||
|
||
@Cucumber | ||
public class NoFeatures { | ||
|
||
} |