How to add listeners to the Cucumber test automation framework (5/7)

Photo by Jelleke Vanooteghem Unsplash


According to definition, an event listener is a function that waits for an event to occur.

Implement Cucumber plugin

Cucumber plugins implementation fully based on an idea of listeners. Documentation about events publishers can found here.

Add Cucumber plugin to the configuration

We need to say Cucumber to use this plugin.

Execute the tests

Execute system.feature file. Console output will contain messages from the ListenerPlugin:



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store