1.

What is the use of the Options tag in the Cucumber Framework?

Answer»

The OPTIONS tag is a part of the TestRunner file in the CUCUMBER framework, and it takes the form of an annotation named @CucumberOptions. 

It has two parameters: glue and feature:

  1. Feature: The PATH to the feature file is specified by the feature option.
  2. Glue: The glue argument is used to provide the step definition file's location.

Example:

IMPORT org.junit.runner.RunWith; import cucumber.api.CucumberOptions; import cucumber.api.junit.Cucumber; @RunWith (Cucumber.class) @CucumberOptions ( features = "src/test/Sample/features ", glue = {"StepDefinitionFile"} ) PUBLIC class SampleTestRunner { }


Discussion

No Comment Found