matthew thomas
2018-05-24 07:15:33 UTC
I'm unsure of the way I should be tackling this scenario.
I have a Scenario Outline where one step is as follows:
When I make a payment by "<Payment Method>"
Then I have my example table as follows:
Examples:
|Payment Method|
|One off credit card|
|Direct debit bank account|
|Direct debit credit card |
Now in the step def code I can handle this just fine for the step def which
reads as @When("^I make a payment by \"([^\"]*)\"$") which contains my
various if statements to handle each of the examples.
But I then have a generic line at the end of my feature which reads
something like "And payment is completed". For this step I'd like to run
some queries on the source system to ensure payment went through as
expected. But there are different outcomes to test depending on what
example is being run.
So whats the best way to pass an example value into another step def? Or am
I thinking about this the wrong way?
I have a Scenario Outline where one step is as follows:
When I make a payment by "<Payment Method>"
Then I have my example table as follows:
Examples:
|Payment Method|
|One off credit card|
|Direct debit bank account|
|Direct debit credit card |
Now in the step def code I can handle this just fine for the step def which
reads as @When("^I make a payment by \"([^\"]*)\"$") which contains my
various if statements to handle each of the examples.
But I then have a generic line at the end of my feature which reads
something like "And payment is completed". For this step I'd like to run
some queries on the source system to ensure payment went through as
expected. But there are different outcomes to test depending on what
example is being run.
So whats the best way to pass an example value into another step def? Or am
I thinking about this the wrong way?
--
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.