Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CucumberJS Console Output Given,When,Then Test Steps during run time

Using protractor-cucumber-framework

How do I modify the console output of the CucumberJs that will output the steps during run time.

Example Scenario in Feature:

Given that Home Page is Displayed
When I Click Sales Button at Home Page
Then Sales Page is Displayed

When Running the Test, it should output the ff. in the console.

Given that Home Page is Displayed - Passed
When I Click Sales Button at Home Page - Passed
Then Sales Page is Displayed - Passed
like image 576
Ry-ry Avatar asked Sep 15 '25 10:09

Ry-ry


1 Answers

Change protractor conf.js to specify a formatter in cucumberOpts as following:

exports.config = {

    cucumberOpts: {
        format: [require.resolve('cucumber-pretty')]
    }}
}
like image 127
yong Avatar answered Sep 16 '25 23:09

yong