Annotations used in cucumber-jvm

@Runwith :

Classes annotated with @RunWith(Cucumber.class) will run a Cucumber Feature. The class should be empty without any fields or methods.

Cucumber will look for a .feature file on the classpath, using the same resource path as the annotated class (.class substituted by .feature).

Continue reading

USE OF BACKGROUND, HOOKS & TAGS IN CUCUMBER-JVM

Background :

Often times when writing multiple scenarios within a singular feature file you see repeated test steps. Initial test steps that are common across all scenarios and scenario outlines can be pulled out into a Background test step. These steps get executed before every scenario. This can greatly reduce the number of test steps in the feature file, and increase readability.

Continue reading