有一个JBehave场景。 例如, 在DB中给出一些记录(在DB中插入一些记录) 当服务执行某些操作(调用某些服务)
有没有办法在单层故事中多次运行此场景?
答案 0 :(得分:7)
另一种方法:
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|
如果您不想在故事中复制/粘贴示例表格的行,请从文件中加载表格:
Examples:
/path/to/file/with/parameters/somefile.table
有关详细信息,请参阅:Loading parameters from an external resource