Multiple feature inside single feature file

In BDD, cucumber is designed for the non-technical audience as well.

  • Writing scenario and steps definition in Gherkin Language or simple English is must support other audience.

  • All scenario should be executed Independently. No dependency on other scenario or feature file

In my past experience, Adding more complexity will add more flaky tests and High Maintenance cost

Agree with @philip John


It is not possible to have multiple feature inside single feature file. If you create multiple feature inside single feature file, you will get Gherkin Parser exception while running cucumber scenarios. So the answer is NO.

C:/Users/ABC/RubymineProjects/XYZ.feature: Lexing error on line 47: 'Feature test google'. See https://github.com/cucumber-attic/gherkin2/wiki/LexingError for more information. (Cucumber::Core::Gherkin::ParseError)

Well, it is obviously not a good practice. It is best to put a single feature in a feature file. You should create new feature files for doing this. But you can add any number of scenarios in a single feature file.

The corresponding steps may or may not be in a single step file.