Cucumber js — Data table

Vinod Muralidharan
1 min readJul 25, 2020
Photo by Louis Hansel @shotsoflouis on Unsplash

What cucumber — data table

Official definition: Data Tables are handy for passing a list of values to a step definition

https://cucumber.io/docs/gherkin/reference/

Why cucumber — data table

The cucumber data table is a great way to represent the input data the application under test (AUT). This way your product owner/ stakeholders understand what your automation framework is trying to send. The data table is the best way to represent complex data sent to the AUT.

Guide:

Now let's see, how to use Cucumber data table in javaScript/NodeJs.

Source: Official Guide

  1. rowsHash():

2. rows()

3. hashes()

https://gist.github.com/vmwhereqa/670f9157b85376b3aa5ce78110622d04

--

--

Vinod Muralidharan

Currently in Berlin, working as senior SDET in LiveIntent Inc. Passionate about Automation testing, Agile, clean code and best practices