This post is available at http://www.thinkcode.se/blog/2014/06/30/cucumber-data-tables
June 30, 2014
Cucumber data tables
11 Comments »
RSS feed for comments on this post. TrackBack URI
This post is available at http://www.thinkcode.se/blog/2014/06/30/cucumber-data-tables
RSS feed for comments on this post. TrackBack URI
Super useful 🙂
Thanks
Comment by BehranG BinA — August 14, 2014 @ 03:45
Hi!
I am glad you liked it.
Thomas
Comment by Thomas Sundberg — August 14, 2014 @ 06:05
nice article 🙂
Comment by sumita — November 5, 2014 @ 09:51
FWIW, this also works nicely with python Behave.
Comment by Greg Gauthier — March 31, 2015 @ 10:25
Hi,
I can read froma table that has more than columns using the below last solution. The erro that I receive : cucumber.runtime.CucumberException: No such field
I’m using Cucumber JVM.
Any solutions?
Comment by Cornelia — June 16, 2015 @ 09:32
I meant to mean that I can’t read from a table that has more than 2 columns
Comment by Cornelia — June 16, 2015 @ 09:33
Hi!
I am not sure what your problem is. I would have to see your code to be able to offer any suggestion. If you share it on Github or something similar, I might be able to take a look.
/Thomas
Comment by Thomas Sundberg — June 16, 2015 @ 09:56
Hi Thomas,
Nice tutorial which is explaining complex DataTable API in very simple way.
Just wanted to check if nested objects can also be bound.
e.g. Person has 2 direct attributes (firstName, lastName) and has nested “Address” Object.
Address Object has street Attribute
| firstName | lastName | address.street |
| abc | xyz | 5657 |
public void test_xyz(List persons) throws Throwable {
… some code ….
persons.get(0).getAddress().getStreet();
}
Comment by Ankit Pandey — January 22, 2016 @ 11:32
Hi Ankit!
I don’t know. Or rather I haven’t tried. I would do an experiment and find out.
At the same time, I am not sure why I would want that for the moment. The data in a data table isn’t a database, it is examples needed for a specific scenario. A potential complex system with nested values seems a bit risky to me. Chances are that you introduce problems that way. It is probably better to be dead simple and therefore a bit unsophisticated.
/Thomas
Comment by Thomas Sundberg — January 22, 2016 @ 14:18
Thank you very much for you blog post. I did not know that Gherkin is that powerull. You post is far better than the official Cucumber docs.
Comment by Robert — April 15, 2016 @ 12:11
Thanks this is helpful.
Comment by rlsmall — April 21, 2016 @ 01:03