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: Wrapping up
- This is how the data in the list of maps was stored. On the left hand side, we have three headers and the data as A, B, C and D, E, F in two different rows. And on the right hand side, each of these rows became a map. Within the map, you had the key entries. So, a key value pair is header 1 and value A, and so on and so forth. Please take a moment to review this slide. Data tables are very powerful constructs. You can use data tables to write highly compact and reusable test scenarios. It's a good idea to know how the data is stored but if you find different approaches in this lesson confusing, no worries. Just use, DataTable.raw function to read the contents of the data table as a list of list of strings and play with it. And then, use the GET method to to inspect elements. One key thing that I want to point out is we have used string examples in this lesson. But you can read data as integers from the data table. For example, data tables can be read in a map with integer values as…
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)
-
-
-