Hi, this is my first post. I did some research about this issue without success.
What I want is something like this:
JUnitCore.runClasses(OutOfStockTest.class)Where OutOfStockTest.java is:
@RunWith(Cucumber.class)
@CucumberOptions(
features = {"classpath:/home/alexandermiro/work/atest-bf/bdd/out_of_stock.feature"}
, glue = {"br.com.softbox.atest.features"}
)
public class OutOfStockTest {
}
Context:
I am building a automation tests framework that should load a JAR file which contains the step definitions and the runner classes
(i.e OutOfStockTest). The feature files would be located in another place as shown above. The idea is to build an application that
will load all tests (from the JAR) in memory and after that, the user could choose (via GUI) a specific test to run.
As shown in screen02.png, an attempt to run (via IDE) the OutOfStockTest shows the output message "No features found at[...]".
I've tried 'classpath' without "out_of_stock.feature". It's clear that the second stage (JUnitCore.runClasses()) will not work having
that issue unsolved.
This project structure is like this way in order to have the Cucumber classes inside the JAR. There is another approach
where I could keep my test files bellow the 'test' directory (see screen01.png), however I would have to do extra work to manage
Maven to generate a parallel JAR to package the tests class.
So,
1) Is there any chances that this "infrastructure" will work as I've mentioned?
2) What am I doing wrong in trying to execute a Cumcumber test using the IDE like I did?
Thanks
Miro