See how to use DataTable, for example:
Data Tables are handy for specifying a larger piece of data:
Given the following users exist: | name | email | phone | | Aslak | email@example.com | 123 | | Matt | firstname.lastname@example.org | 234 | | Joe | email@example.com | 456 |
Like that you can catch whatever you want. Or you can put the argument to
catch between quotes and get in your step definition:
Scenario: Add two numbers
Given the input "2+2"
When the calculator is run Then the output should be "4"
Or to use scenario outlines:
Scenario Outline: Withdraw fixed amount
Given I have <Balance> in my account
When I choose to withdraw the fixed amount of <Withdrawal> Then I should
receive <Received> cash
And the balance of my account should be <Remaining>
| Balance | Withdrawal | Received | Remaining |
| $500 | $50 | $50 | $450 |
More details are here:http://cukes.info/step-definitions.html
Post by Rob Park Post by Joe Fleck Post by Joe Fleck Post by Rob Park Post by Joe Fleck
I am new to cucumber and wondered if there is a way to pass a variable
to a feature statement or call a method to get the variable needed.
Feature: Retrieve state forrn
As a customer
I want to print a form for this state
In the feature statement above I want 'state' to be the variable. I
want this to display in the Feature header output of the test result in
For me, I'm not really sure what you're trying to do yet.
Where would the value for state come from?
Post by Joe Fleck
Thank you for responding. The state variable could come from a yml file
or a global variable in Jenkins.
We have several customers who we need to run our scripts against. We
use the gem that creates a nice html output with the results.
I want to see which state was executed in the feature statement in Jenkins.
What would your scenario look like?
Guess I'm still wondering why that informations isn't coming from the
-- Rules --
1) Please prefix the subject with [Ruby], [JVM] or [JS].
2) Please use interleaved answers http://en.wikipedia.org/wiki/Posting_style#Interleaved_style
3) If you have a question, don't reply to an existing message. Start a new topic instead.
You received this message because you are subscribed to the Google Groups Cukes group. To post to this group, send email to cukes-/JYPxA39Uh5TLH3MbocFF+Gfirstname.lastname@example.org To unsubscribe from this group, send email to email@example.com. For more options, visit this group at https://groups.google.com/d/forum/cukes?hl=en
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+unsubscribe-/JYPxA39Uh5TLH3MbocFF+Gfirstname.lastname@example.org
For more options, visit https://groups.google.com/groups/opt_out.