Running tests: some shortcuts

Last updated on
11 March 2021

This documentation needs work. See "Help improve this page" in the sidebar.

The doobie project has been structured to take advantage of running tests as follows:

All of one team's tests:
bin/behat features/folder

A single feature:
bin/behat features/folder/filename.feature

A single scenario within a feature:
bin/behat features/teamname/filename.feature:7 where 7 represents the first line of the scenario. Exclude the tagname if present.

All tests with a certain tag (using @ symbol)
bin/behat --tags @tagname

All tests except a certain tag (omitting @ symbol)
bin/behat --tags ~tagname

Multiple tags:
# Run tests tagged with @tagname1 OR @tagname2
bin/behat --tags "@tagname1,@tagname2"

# Run tests tagged with both @tagname1 AND tagname2 (showing you can also use the equals sign after "--tags" if you prefer)
bin/behat --tags="@tagname1&&@tagname2"

# Run tests tagged with @tagname1 AND @tagname2 AND NOT @tagname3
bin/behat --tags "@tagname1&&@tagname2&&~@tagname3"

By adding an @javascript tag above the feature (for all the scenarios) or above a single scenario, the test will use Selenium and Firefox to run the test. These defaults can be changed in the behat.yml file.

Help improve this page

Page status: Needs work

You can: