Behat-SkipTestsExtension allows you to skip tests without excluding them from the output.
Install by adding to your composer.json
:
composer require --dev bex/behat-skip-tests
Enable the extension in behat.yml
like this:
default:
extensions:
Bex\Behat\SkipTestsExtension: ~
You can disable the scenario skipping like this:
default:
extensions:
Bex\Behat\SkipTestsExtension:
skip_scenarios: false
You can disable the feature skipping like this:
default:
extensions:
Bex\Behat\SkipTestsExtension:
skip_features: false
You can configure the skip tags like this:
default:
extensions:
Bex\Behat\SkipTestsExtension:
skip_tags: ['myawesometag'] # default: ['pending', 'skip']
Add a skip tag to any scenario to skip all steps within that scenario.
By default you can use the @pending
or @skip
tags to skip a scenario, but you can configure your own skip tags as well (see configuration above).
See example in this feature file.