|
||||||||
This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators. For more information on JIRA, see: http://www.atlassian.com/software/jira |
- [jbehave-dev] [jira] (JBEHAVE-829) Issues while r... Suryakant Panda (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-829) Issues wh... Alexander Lehmann (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-829) Unable to... Mauro Talevi (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-829) Unable to... Mauro Talevi (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-829) Unable to... Mauro Talevi (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-829) Unable to... Alexander Lehmann (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-829) Unable to... Alexander Lehmann (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-829) Unable to... Alexander Lehmann (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-829) Unable to... Alexander Lehmann (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-829) Unable to... Alexander Lehmann (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-829) Unable to... Alexander Lehmann (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-829) Unable to... Alexander Lehmann (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-829) Unable to... Mauro Talevi (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-829) Unable to... Alexander Lehmann (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-829) Unable to... Alexander Lehmann (JIRA)
- [jbehave-dev] [jira] (JBEHAVE-829) Unable to... Mauro Talevi (JIRA)
The problem comes from the fact that running the tests inside Eclipse or Maven works quite different from running it from inside a jar.
When running the story from the source files and classes inside Eclipse, you can use LoadFromRelativeFile and the storyPaths method can use findPaths to look up the actual files in the directory.
Eclipse will copy the story files to bin or target directory that will also be the directory for the class that jbehave is running from (the JUnitStories subclass), when running in maven, all files are in target as well.
When running inside the jar, the classes are found inside the jar which translates back to the local directory where is is located in, but the the findPaths methods looks in that directory and will not find anything.
For this to work in a jar, you have to change the StoryLoader to LoadFromClasspath(getClass()), however finding the stories will not work at all I think.
You can explicitly list your story files in the storyPaths method like this, this makes the stories run from the jar.