Several ways of executing Behat Project

Profile picture for user devraj

There are different ways of executing your Behat Project. You can execute complete suite, a scenario or set of tagged scenarios.

Below are the ways using command lines:

Execute Complete Suite: To execute all feature files use below command.

This will execute all feature files inside features folder.

$ bin/behat features/

Executed tagged Scenarios: To execute tagged scenarios from set of features files use below command. Below command will execute all scenario tagged with smoke.

$ bin/behat --tags=smoke

Execute single Scenario: To execute particular scenario using line number use below command.

$ bin/behat features/home.feature:5

Execute single feature file: To execute single feature file use below command. This will execute all sceanrio of home.feature file.

$ bin/behat features/home.feature
Tags