Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run jbehave scenario multiple times sequentially

Tags:

java

jbehave

There is a JBehave scenario. For example, Given something some record in DB (inserts some record in DB) When service perform some action (call some service)

Is there any way to run this scenario many times in single story run?

like image 784
long Avatar asked Dec 11 '14 09:12

long


1 Answers

Another approach:

Run jbehave scenario multiple times sequentially

Narrative:
In order to run jbehave scenario multiple times sequentially
As a development team
I want to use examples table

Scenario:  run jbehave scenario multiple times sequentially
GivenStories: path/to/story/we/want/to/run/multiple/times/storyname.story

Then some null step

Examples:
|x|
|1|
|2|
...
...
...
|100000|

If you dont want to copy/paste lines of the examples table in the story, then load the table from a file:

 Examples:
 /path/to/file/with/parameters/somefile.table

See: Loading parameters from an external resource for details

like image 50
krokodilko Avatar answered Oct 05 '22 13:10

krokodilko