Skip to content
/ .. / .. /
Execute Features with Tags

Execute Features with Tags

The -t parameter is used to specify tags, which correspond to Feature Files annotated by the @ sign followed by a tag/keyword. Including the -t parameter allows intaQt Client to only execute features with matching tags.

Feature File With Tag Example

@oneTag @twoTag
Feature: Feature2
  Scenario: Feature2

1. Execute Features Containing All Tags (AND)

Let's assume that our project has two tags used within it: oneTag and twoTag.

Run the following to only execute Feature Files that contain all of the project tags:

./intaqt test HowTo-IntaQtClient -t oneTag,twoTag

The , indicates an AND clause, meaning both oneTag and twoTag must be present. There must be no spaces between the comma and the next tag name, for example, oneTag, twoTag. If a space is added between two the tags, intaQt Client will incorrectly interpret twoTag as a Feature File named twoTag.feature.

3. Execute Features With One of The Specified Tags (OR)

Run the following to only execute Feature Files that contain at least one of the specified tags:

./intaqt test HowTo-IntaQtClient -t "oneTag|nonExistentTag"

This time the tags must be enclosed with quotation marks " " and are separated by a pipe |. The | character indicates an OR clause meaning one of the two tags must be specified.

4. Ignore Features Containing a Tag (Negation)

Use the tag to be ignored within quotation marks " " and add a tilde ~ to omit Feature Files that contain a specific tag:

./intaqt test HowTo-IntaQtClient -t "~oneTag"

The ~ character indicates a Negation, meaning that oneTag will be ignored.

5. Combine Tags (AND, OR, Negation)

All filtering operators can be combined.

Combining Tags Example

./intaqt test HowTo-IntaQtClient -t "~ignored,oneTag,twoTag|someOtherTag"

The example above will execute Features Files that do not have an @ignored tag, contain @oneTag as well as one of @twoTag or @someOtherTag.