java - how to use Example table (Parametrised Scenarios) with normal "Given" statement -


when trying run below story file, statement "a stock of" executing 2 time want execution should happen once , statement "reference data databasetable record sds id = , swift bic = " should execute twice.

scenario: parametrised scenarios test  given scenario parameter - swiftbic = jbehavexxx given scenario parameter - receiverbic = jbehaveyyy given scenario parameter - extsdsid = 1111 given scenario parameter - sdsid = 22222  given reference data databasetable record <alias> sds id = <sid> , swift bic = <bic> given stock of.  examples: |alias  |sid            |bic            | |def    |${sdsid}       |${swiftbic}    | |deff   |${extsdsid}    |${receiverbic} | 

in cucumber using examples shortcut writing same scenario twice different data. code above equivilent to:

scenario: test fisrt set of data      given reference data databasetable record def sds id = 2222 , swift bic = jbehavexxx     given stock of.  scenario: test second set of data      given reference data databasetable record def sds id = 1111 , swift bic = jbehavyyy     given stock of. 

so if want given stock of. step execute once cannot use example shortcut , have have 2 separate scenarios explicit steps.


Comments

Popular posts from this blog

Android : Making Listview full screen -

javascript - Parse JSON from the body of the POST -

javascript - Chrome Extension: Interacting with iframe embedded within popup -