Fix loading scenarios in suiteslicing mechanizm.
Issue was caused by changes in cucumber-jvm 4.8.0 (previously used 4.2.0). With latter cucumber version there is an issue to create java.io.File from java.net.URI, because now cucumber stores feature file URI in different format, causing error in File constructor (see related issue for details).
Description of PR:
Create utility class PathUtils to correctly transform URI strings like file:/path/to/feature or classpath:/path/to/feature into existing files. This class is applied in methods CucumberScenarioLoader#getScenarios and CucumberSerenityRunner#forIncludedFeatures
Fix was tested on windows 10 environment.
How should this be manually tested?
Run Serenity tests using suiteslicing mechanizm (i.e. using properties serenity.batch.count and serenity.batch.number). Also, CucumberScenarioLoaderTest test is auto fixed.
Summary of this PR
Fix loading scenarios in suiteslicing mechanizm. Issue was caused by changes in cucumber-jvm 4.8.0 (previously used 4.2.0). With latter cucumber version there is an issue to create
java.io.File
fromjava.net.URI
, because now cucumber stores feature file URI in different format, causing error in File constructor (see related issue for details).Description of PR:
Create utility class
PathUtils
to correctly transform URI strings likefile:/path/to/feature
orclasspath:/path/to/feature
into existing files. This class is applied in methodsCucumberScenarioLoader#getScenarios
andCucumberSerenityRunner#forIncludedFeatures
Fix was tested on windows 10 environment.
How should this be manually tested?
Run Serenity tests using suiteslicing mechanizm (i.e. using properties
serenity.batch.count
andserenity.batch.number
). Also,CucumberScenarioLoaderTest
test is auto fixed.Relevant tickets
This is a fix for issue #21