Reputation: 51
I am trying to test some API's using jbehave. While trying to configure my Jbehave stories i am running into the following error (attached below):
I even tried using --illegal-access=permit
. I used the command java -cp out com.example.prederiq.PrederaAiq.StoryConfiguration
(where com.example.prederiq.PrederaAiq
is my package name and StoryConfiguration is my class name that i want to configure) on my windows command prompt but it threw a classNotFoundException. i even navigated to the folder where my Configuration file is present using cd ubuntu commands and tried to use this command but it still did not work.
My StoryConfiguration class:
public class StoryConfiguration extends JUnitStories {
@Override
public Configuration configuration() {
return new MostUsefulConfiguration().useStoryLoader(new LoadFromClasspath(this.getClass())).useStoryReporterBuilder(new StoryReporterBuilder().withCodeLocation(CodeLocations.codeLocationFromClass(this.getClass())).withDefaultFormats().withFormats(StoryReporterBuilder.Format.CONSOLE, StoryReporterBuilder.Format.HTML));
}
@Override
public InjectableStepsFactory stepsFactory() {
return new InstanceStepsFactory(configuration(),new PrederaAiqApplicationTests());
}
@Override
public List<String> storyPaths() {
return Arrays.asList("com/example/prederiq/PrederaAiq/test.story");
}
}
Upvotes: 2
Views: 12575