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: Adding a data table
From the course: Cucumber Essential Training
Data table: Adding a data table
- Cucumber Data Tables. When you supply tabular data to a scenario step, Cucumber generates a special data type, called Data Table. You need to write data parsing logic to parse data in these data tables. There are many ways to parse data from this data table, which makes the process somewhat confusing. In this lesson, we will take a look at a few data parsing techniques and understand which approaches may be more applicable, depending on how data is supplied. So, let's go ahead and add a new feature file I'm going to call this datatable.feature, or datatables.feature, and I'm just going to remove all the default text that comes here. It's going to be very useful in a real-life project. We don't need to use these right now. Let's add feature name, called Data Tables, and, within that feature, let's define a scenario, and I'm going to call this scenario Bill Amount Generation. I'll go ahead and use an existing scenario. So, this is the scenario I'm going to copy and use in my file. The…
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)
-
-
-