In my cucumber -jvm, Maven, junit Setup I have my testRunner file as
package com.lebara.testrunner;
import cucumber.junit.Cucumber; import org.junit.runner.RunWith;
@RunWith(Cucumber.class) @Cucumber.Options(
glue = {"com.lebara.stepdefs","com.lebara.framework.main", "com.lebara.testrunner"}, features = "C:/Users/sarthak.dayanand/Documents/WebRefreshTest/CukeAutomation/LebaraWebAutomationTest1/src/main/resources", format = {"pretty", "html:target/cucumber-html-report", "json-pretty:target/cucumber-report.json"}, tags = {"@UserJourney"}
) public class RunCukesTest { }
I have my feature file in the above mentioned directory.
If I run it, I get the exception,
cucumber.runtime.CucumberException: No features found at [C:/Users/sarthak.dayanand/Documents/WebRefreshTest/CukeAutomation/LebaraWebAutomationTest1/src/main/resources/cucumber]...
If I remove the "features" option in the testrunner, it tries to look for feature files in the same directory as my testrunner.java
cucumber.runtime.CucumberException: No features found at [com/lebara/testrunner]
And if I put the feature files there, it works.
My question is why is my feature file not being picked up from my previous location, which i thought to be the default file structure for cucumber - maven setup.
How do I make it pick up from there? Help appreciated.
--
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cu...@googlegroups.com. To unsubscribe from this group, send email to cukes+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
Thanks for the quick response Aslak.1. What cucumber-jvm version?<version>1.0.2</version>
Thanks. I shall read through the changelog.Have updated cucumber-java to 1.1.1Now get a different exception.java.lang.NoClassDefFoundError: cucumber/io/ResourceLoader
I could Iron out the errors. The packages have changed a bit on 1.1.1 version. I could run it successfully.Just a few obervations. If I give the features option asfeatures = "LebaraWebAutomationTest1/src/test/resources/cucumber/dashBoardUserJourney/DashboardPageUserJourney.featureGet an exception sayingjava.lang.IllegalArgumentException: Not a file or directory: C:\Users\sarthak.dayanand\Documents\WebRefreshTest\CukeAutomationNot sure where it is picking that path from.
If I give the absolute path, it works fine:features = "C:\\Users\\sarthak.dayanand\\Documents\\WebRefreshTest\\CukeAutomation\\LebaraWebAutomationTest1\\src\\main\\resources"
Also it works fine if I givefeatures = "classpath:cucumber",