-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support for tags in BDD feature(s)/scenario(s). #191
- Loading branch information
Showing
6 changed files
with
65 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
layout: default | ||
title: Using Tags | ||
nav_order: 7 | ||
has_children: false | ||
parent: BDD Reference | ||
--- | ||
|
||
# Using Tags | ||
|
||
`terraform-compliance` supports using tags within the BDD feature files. | ||
|
||
An example tag usage : | ||
```gherkin | ||
Feature: My test feature | ||
@nofail | ||
Scenario: #1 Ensure my specific s3 buckets are private but dont fail | ||
Given I have aws_s3_bucket defined | ||
Then it must contain acl | ||
And its value must be private | ||
Scenario: #2 Some other scenario that may fail | ||
Given .... | ||
... | ||
``` | ||
|
||
in this case, `terraform-compliance` will execute both scenarios but will never | ||
fail Scenario #1 due to `@nofail` tag. These tags can also be use on top of the | ||
Features instead of Scenarios. Default `Failure :` error heading will also be changed | ||
with the tag name. It will be `nofail :` in the example above. | ||
|
||
## Supported Tags | ||
|
||
| Tag Name(s) | Description | | ||
|:-----------:|:------------| | ||
| `warning`, `no-failure`, `no-fail`, `info`, `nofailure`, `nofail`, `dontfail` | Do not fail the scenario | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters