Feature
2 min
Feature Files (Cucumber)
Feature files (.feature) define test scenarios in a business-readable format using Gherkin syntax.
They describe application behavior from a user’s perspective and serve as the main input for Cucumber test execution.
Purpose
Feature files are used to:
- Describe application behavior in plain language
- Define test scenarios independently of implementation details
- Act as living documentation for the system under test
- Drive test execution through step definitions
Structure
A feature file typically consists of:
- Feature – High-level description of the functionality
- Scenario / Scenario Outline – Individual test cases
- Steps – Actions and validations written in Given / When / Then format