Running tests: some shortcuts
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
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion
Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.