Add Behat tags selector to the "Run Tests" like @local, @development, @staging, @production

Created on 7 September 2016, over 8 years ago
Updated 24 August 2024, 4 months ago

It will very good to be able to select tags before we hit "Run Tests"

For example:

If I want to only run scenarios which only should be done on Local, Development, Staging, or Production.
or other types of tags like @seo, @social, @security, @front_end, @back_end

Scenarios are tagged with the Behat tags of:

@local = Local
@development = Development server.
@staging = Staging and testing server.
@production = Production live server.

So that we only run bin/behat --tags with the right tag for the environment.

Example:
==========================================

$ bin/behat --tags '@development'

Which it will run Scenarios which has got the @development tag.

==========================================

$ bin/behat --tags '@staging'

Which it will run Scenarios which has got the @staging tag.

==========================================

$ bin/behat --tags '@production'

Which it will run Scenarios which has got the @production tag.

==========================================

Scenarios are tagged with the Behat tags to limit the selection of scenarios based on needed test or what change in the tested site.

For Example:

Actions:

[ javascript|Selenium + JavaScript ] @javascript = Run scenarios with Selenium + JavaScript needed in the page.
[ api|Drupal API ] @api = Run scenarios with Drupal API when we only have file access to the site.

Environment:

[ local|Local ] @local = Recommended to run scenarios only in Local development workstations.
[ development|Development ] @development = Recommended to run scenarios only in Development servers.
[ staging|Staging and testing ] @staging = Recommended to run scenarios only in Staging and testing servers.
[ production|Production ] @production = Recommended to run scenarios only in Production live servers.

Other: you may have your behat tags and flags for your custom usage.

[ frontend|Front-End ] @frontend = Front-End scenarios.
[ backend|Back-End ] @backend = Back-End scenarios.
[ admin|Administration ] @admin = Testing scenarios for the administration only.
[ init|Initialization ] @init = Initialization scenarios before tests.
[ cleanup|Cleanup ] @cleanup = Cleanup scenarios after tests.
[ tools|Tools ] @tools = tools scenarios.

Feature request
Status

Closed: outdated

Version

4.0

Component

Code

Created by

🇯🇴Jordan Rajab Natshah Jordan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024