serenity-bdd / serenity-cucumber6

Other
11 stars 23 forks source link

feature is not under the 'features' directory. Requirements report will not be correctly generated! #8

Closed schup closed 3 years ago

schup commented 3 years ago
15:15:39.536 [Test worker] INFO  i.c.core.plugin.SerenityReporter - Running feature from file:///D:/serenity-cucumber-starter/src/test/resources/features/search/search_by_keyword.feature
    15:15:39.536 [Test worker] WARN  i.c.core.plugin.SerenityReporter - Feature from file:///D:/serenity-cucumber-starter/src/test/resources/features/search/search_by_keyword.feature is not under the 'features' directory. Requirements report will not be correctly generated!

This happens on Windows using the vanilla serenity-cucumber-starter project.

In SerenityReporter the following code checks for the existence of \features\ in the URI .... The usage of File.separatorChar is incorrect as the URI will always contain a forward slash.

        String featuresRoot = File.separatorChar + FEATURES_ROOT_PATH + File.separatorChar;
        if (pathURIAsString.contains(featuresRoot)) {

Command used to run the build:

gradlew build test aggregate reports