Cucumber Console Step Logger plugin
Cucumber plugin for the printing steps into console. For the console output used slf4 logger
Supported Cucumber 4 and Cucumber 5 versions
Example of the output from the step
---------- Test Step Execution ----------
When I populate mandatory fields with valid values
| gazetteYear | startDate | endDate |
| 2019 | 1 | 5 |
---------- Test Step Execution ----------
How to use Cucumber 4 console step logger plugin
Add following dependency to you project Maven
<dependency>
<groupId>io.github.khda91</groupId>
<artifactId>step-logger-cucumber4-plugin</artifactId>
<version>$LATEST_VERSION</version>
<scope>test</scope>
</dependency>
Gradle
testRuntime "io.github.khda91:step-logger-cucumber4-plugin"
Junit 4
@RunWith(Cucumber.class)
@CucumberOptions(
plugin = {"io.github.khda91.cucumber4.step.console.logger.Cucumber4StepConsoleLogger"}
)
public class Runner {
}
TestNg
@CucumberOptions(
plugin = {"io.github.khda91.cucumber4.step.console.logger.Cucumber4StepConsoleLogger"}
)
public class Runner extends AbstractTestNGCucumberTests {
}
Maven
mvn clean test -Dcucumber.options="--plugin io.github.khda91.cucumber4.step.console.logger.Cucumber4StepConsoleLogger"
Gradle
See official Gradle documentation for Cucumber
How to use Cucumber 5 console step logger plugin
Add following dependency to you project Maven
<dependency>
<groupId>io.github.khda91</groupId>
<artifactId>step-logger-cucumber5-plugin</artifactId>
<version>$LATEST_VERSION</version>
<scope>test</scope>
</dependency>
Gradle
testRuntime "io.github.khda91:step-logger-cucumber5-plugin"
Junit 4
@RunWith(Cucumber.class)
@CucumberOptions(
plugin = {"io.github.khda91.cucumber5.step.console.logger.Cucumber5StepConsoleLogger"}
)
public class Runner {
}
TestNg
@CucumberOptions(
plugin = {"io.github.khda91.cucumber5.step.console.logger.Cucumber5StepConsoleLogger"}
)
public class Runner extends AbstractTestNGCucumberTests {
}
Maven
mvn clean test -Dcucumber.options="--plugin io.github.khda91.cucumber5.step.console.logger.Cucumber5StepConsoleLogger"