Details
Description
Hello !
I'm using a ETSY sample based project to run my JBehave stories with Selenium.
I created a JFrame based user interface to have a standalone runnable for people who run JBehave + Selenium tests.
My stories files are stored as following "project/src/main/resources/stories/*.story"
To find the story files when running from Maven or Eclipse debug this line works fine :
new StoryFinder().findPaths(codeLocationFromClass(this.getClass()).getFile(), asList("*/.story"), null).toArray(new String[0]);
But when running from the JAR file that does not work : for "codeLocationFromClass(this.getClass()).getFile()" I get : "/C:/Documents%20and%20Settings/lbp0527/Bureau/project/build/project-1.0-SNAPSHOT-jar-with-dependencies.jar!"
The JAR file contains at its root the "stories" folder with inside all my *.story files but I can't find a good way to retrieve this list from my UI.
Do someone knows a way to find story files within the built JAR ?
Maybe this is some "off topic" for the Jira, please tell me if and how to find my answer.
Thanks !
Activity
Field | Original Value | New Value |
---|---|---|
Assignee | Mauro Talevi [ maurotalevi ] | |
Fix Version/s | 3.7.5 [ 18997 ] | |
Affects Version/s | 4.x [ 18279 ] |
Issue Type | Wish [ 5 ] | Improvement [ 4 ] |
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Fix Version/s | 3.8 [ 19104 ] |
Checkout this example:
https://github.com/jbehave/jbehave-core/tree/master/examples/executable-jar
You need to specify the paths individually, without using the * notation.