Tagging scenarios
This documentation needs work. See "Help improve this page" in the sidebar.
Existing tags
Entire features or individual scenarios can be tagged as follows to assist in running tests:
Tags to assist in selectively running tests
@anon
Used for scenarios/features that don't require user authentication to run the test.
@ci
Used to include a feature or scenario in the Drupal.org continuous integration system. Do NOT add this tag unless the feature/scenario in question has been proposed for inclusion in the issue queue and accepted.
@dependent
Used to indicate a scenario that is dependent on data created previously in the same feature file. In a perfect world, scenarios like this would not exist, and the tag will help us isolate the scenarios if/when we come up with a better solution. Scenarios should *never* depend on data from a different feature file.
@flaky
Currently used to mark tests which are pretty consistently failing on the first run and succeeding on all subsequent runs. Once #1782612: Tests failing on first run and succeeding on subsequent runs is resolved, use of this tag is deprecated.
@htaccess
Denotes tests that currently cause re-authentication due to htaccss and require manual user input. bddtest.drupal.org is whitelisted to allow these tests to pass when run from that host.
@javascript
Used when the feature being tested relies on CSS or javascript and must use a fully-featured browser for accurate testing. Note: Selenium must be running on the system executing tests or these scenarios will fail.
@known_git6failure
Used when properly written tests fail against the D6 version of Drupal.org because that site is not behaving as expected.
@known_git7failure
Used when properly written tests fail against the D7 version of Drupal.org because that site is not behaving as expected.
@linux
Used to tag scenarios that depend on a properly-setup linux based system. Use of this tag needs to be re-evaluated. #1782628: Re-evaluate @linux tag
@local
Tests that consistently pass in a local environment but fail when run by Jenkins.
@manual
Tests that should be followed by hand. The feature is valid and code appear valid, but they fail intermittently
@slow
Used for scenarios that are, well, slow. There is not, as yet, a definitive metric like, requires more than 10 seconds to complete.
@smoke
Used to denote a very small set of tests that will quickly reveal larger system problems. Where there's smoke, there's probably fire.
@specific_text
Denotes tests that are looking at text that is more likely to change and require update
@timeout
Tests that are likely to timeout, currently at 30 seconds.
@wip
Used to tag a work-in-progress. These are typically excluded from a test run as they may fail or do not yet fully test the feature described.
Section Tags:
The tags below are used to identify where a feature (not an individual scenario) is located within the site map. These should be the first tag on the left above the feature description.
@about
@about_do
@admin
@casestudies
@commit_log
@community
@docs
@downloads
@forums
@front
@getting_started
@git
@login
@learn_drupal
@marketplace
@news
@planet
@project
@revert_homepage_setting
@security
@site_search
@support
@user
Featureset Tags
Featureset tags describe features that don't correspond to a traditional site map structure or are complex features at a lower level on the site.
@forums
Tags to hook into the test process
Certain tags are used to hook into the testing process to trigger activity. For example, a scenario that creates a node might be tagged with @cleanData will attempt to delete a node or project created by one of its steps. See http://docs.behat.org/guides/3.hooks.html for a detailed discussion of how this works in behat.
@clean_data
Can be used to delete a project or issue node created as part of testing.
@gitrepo
Indicates a scenario that creates a git repository and used to invoke an @AfterScenario clean up routine.
@git_branch
Indicates a scenario that creates a branch in the git repository and used to invoke an @AfterScenario clean up routine.
@git_tag
Indicates a scenario that creates a tag in the git repository and used to invoke an @AfterScenario clean up routine.
See http://docs.behat.org/guides/3.hooks.html for a detailed discussion.
Introducing new tags
Any new tags that are committed to the repository should be documented both here and in the project's TAGS.txt file. If in doubt about whether or how to introduce a new tag, open an issue at http://drupal.org/project/doobie
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