0

I am trying to run .feature from java main application or say a spring boot application rather going through Junit approach. I am facing issues to run it from main. somehow i tried to run from main by using Main.main call in eclipse but when i packaged to in .jar or deployed to openshift it started throwing No backend module found exception. Could anyone of you please help me to find a way on it? I am using java8 and cucumber-java8 dependency

e.g

Main.main(new String[] { "-g", "com.test.helloworld", "C:\\Users\\<user.name>\\git1\\test-helloworld\\src\\main\\resources\\helloworld.feature" });

I would like to try this with plain java main class. In eclipse its able to execute without any hassles but when i tries in jar/openshift its unable to load feature or backend modules.

1 Answer 1

1

SpringBoot uses a nested jar structure that requires the use of ApplicationContext.getResources to access it transparently. As such you'll have to implement a resource loader for Cucumber that utilizes the application context.

See also:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.