My Cucumber feature looks like this: Feature: Login Action
Scenario: Successful Login with Valid Credentials
Given User is on Home Page
When User Navigate to LogIn Page
And User enters UserName and Password
Then Message displayed Login Successfully
Scenario: Successful LogOut
When User LogOut from the Application
Then Message displayed LogOut Successfully
When I run it, I get the following error:
WARNING: Cucumber-JVM's --format option is deprecated. Please use --plugin instead. Exception in thread "main" java.lang.IllegalArgumentException: Not a file or directory: C:\Users\testjack001\workspace\myProject\src\myFeature.feature at cucumber.runtime.io.FileResourceIterator$FileIterator.(FileResourceIterator.java:54) at cucumber.runtime.io.FileResourceIterator.(FileResourceIterator.java:20) at cucumber.runtime.io.FileResourceIterable.iterator(FileResourceIterable.java:19) at cucumber.runtime.model.CucumberFeature.loadFromFeaturePath(CucumberFeature.java:101) at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:54) at cucumber.runtime.model.CucumberFeature.load(CucumberFeature.java:34) at cucumber.runtime.RuntimeOptions.cucumberFeatures(RuntimeOptions.java:201) at cucumber.runtime.Runtime.run(Runtime.java:109) at cucumber.api.cli.Main.run(Main.java:36) at cucumber.api.cli.Main.main(Main.java:18)
How can I get this issue resolved?
The entry regarding the --format option is just a warning, it is not an error. Your error starts in the next line:
Exception in thread "main" java.lang.IllegalArgumentException: Not a file or directory: C:\Users\testjack001\workspace\myProject\src\myFeature.feature
Cucumber can not find your feature file at the location it expects it to be placed.