Situation:
In my current project we are running all kinds of different JBehave stories. Every ".story" file is related to a product and a flow.
Example:
xyz-cellphone-call.story would be the story describing making a phonecall with a cellphone.
xyz-phone-call.story would be the story describing making a phonecall with a fixed-line phone.
xyz-cellphone-browse.story would be the story describing browsing the internet with a cellphone.
My question:
In Jbehave you can add metaFilters to filter on the stories based on meta tags. Assume the tags are @product & @action. (@product cellphone, @action call).
Would it be possible to pass a filter to run the JBehave stories concerning both the phone & cellphone stories, if yes, what would be the syntax?
I've tried adding the following filters (none of which work):
+product cellphone +product phone
+product cellphone|phone
+product cellphone,phone
Same for actions.
Is it possible to filter on multiple meta-tags?
I guess there is easier solution for you using groovy http://jbehave.org/reference/stable/meta-filtering.html
In your case it would be -Dmetafilter="groovy: "product=='cellphone' && action=='call'"
I tried it as "-Dmetafilter=groovy:t2 && t3" for this feature file
Only test 2 scenario is executed in this case
How about:
Yes it is possible. In the API docs you will find this information:
So probably if you play with the conditions, you will get your run configuration customized. Try this example:
More info amout the MetaFilter class in the API docs: http://jbehave.org/reference/stable/javadoc/core/org/jbehave/core/embedder/MetaFilter.html