This is actually quite easy to do, although the documentation requires a bit of searching.
What you want is a script outline, for example:
Scenario Outline: Change a member to ABC 60 days before anniversary date Given I have <memberId> When these events occur: | WorkflowEventType | WorkflowEntryPoint | | ABC | Status Change | Then these commands are executed: | command name | | TerminateWorkflow | And For <memberId>, the following documents were queued: | Name | | ABC Packet | Examples: | memberId | | 0047619101 | | 0080762602 | | 0186741901 | | ...etc... |
This will execute your script once for each identifier in the example table. You can expand the table to have multiple columns if necessary.
Or simply put (if you really only have one row in each of the above example tables)
Scenario Outline: Change a member to ABC 60 days before anniversary date Given I have <memberId> When A 'ABC' Event Occurs with EntryPoint 'Status Change' Then a TerminateWorkflow command is executed And For <memberId>, the 'ABC Packet' document was queued Examples: | memberId | | ...etc... |
See the specflow-wiki for github and the cucumber syntax for a description of the scripts for more information.
source share