From the course: Cucumber Essential Training
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Data table: List of list of strings
From the course: Cucumber Essential Training
Data table: List of list of strings
So let's go ahead and define another scenario, and this time we are going to have more than one row. So let's go ahead and copy this, paste it here, and I'm going to call it @ListofListofStrings. And let's add an additional row here without any header. So, paste and let's put Cucumber Salad here, one unit, $15... and this is going to cost $55. So this time, the data will be presented to us in form of a list of a list of strings. So, I'm going to save this and go ahead and use this tag... to put it in our test file. But before we go ahead and run this test, let's go ahead and fix our steps... here. So, this time we have a list of list of strings. So, I'm going to change this here to read a list of list of strings and change the first parameter data type to list of list of strings. Now, this data has to be read in two loops. So the first loop now will be a list of strings, so... like this. I'm going to call it BillItems, and I'm going to introduce a second loop inside. And inside here…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
(Locked)
Data table: Adding a data table3m 17s
-
(Locked)
Data table: Read list of strings2m 23s
-
(Locked)
Data table: List of list of strings3m
-
(Locked)
Data table: List of maps3m 59s
-
(Locked)
Data table: Wrapping up1m 27s
-
(Locked)
Scenario outline: Add scenario outline3m 3s
-
(Locked)
Scenario outline: Adding examples table2m 17s
-
(Locked)
Scenario outline: Implement code4m 49s
-
(Locked)
Scenario outline: Running test2m 59s
-
(Locked)
-
-
-