GithubHelp home page GithubHelp logo

isabella232 / tag-expressions Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cucumber/tag-expressions

0.0 0.0 0.0 6.39 MB

Cucumber tag expression parser

Makefile 4.29% Go 6.14% Shell 2.21% Ruby 6.76% Java 8.56% TypeScript 5.18% Python 55.60% Perl 11.27%

tag-expressions's Introduction

test-go test-java test-javascript test-perl test-python test-ruby

Tag Expressions

Tag Expressions is a simple query language for tags. The simplest tag expression is simply a single tag, for example:

@smoke

A slightly more elaborate expression may combine tags, for example:

@smoke and not @ui

Tag Expressions are used for two purposes:

  1. Run a subset of scenarios (using the --tags expression option of the command line)
  2. Specify that a hook should only run for a subset of scenarios (using conditional hooks)

Tag Expressions are boolean expressions of tags with the logical operators and, or and not.

For more complex Tag Expressions you can use parenthesis for clarity, or to change operator precedence:

(@smoke or @ui) and (not @slow)

Escaping

If you need to use one of the reserved characters (, ), \ or (whitespace) in a tag, you can escape it with a \. Examples:

Gherkin Tag Escaped Tag Expression
@x(y) @x\(y\)
@x\y @x\\y

Migrating from old style tags

Older versions of Cucumber used a different syntax for tags. The list below provides some examples illustrating how to migrate to tag expressions.

Old style command line Cucumber Expressions style command line
--tags @dev --tags @dev
--tags ~@dev --tags "not @dev"
--tags @foo,@bar --tags "@foo or @bar"
--tags @foo --tags @bar --tags "@foo and bar"
--tags ~@foo --tags @bar,@zap --tags "not @foo and (@bar or @zap)"

tag-expressions's People

Contributors

ankitpokhrel avatar aslakhellesoy avatar aurelien-reeves avatar borisosipov avatar brasmusson avatar charlierudolph avatar cukebot avatar cyocum avatar davidjgoss avatar dmboyd avatar ehuelsmann avatar gasparnagy avatar jackorp avatar jenisys avatar krisgesling avatar link89 avatar luke-hill avatar mattwynne avatar mpkorstanje avatar mxygem avatar nhojpatrick avatar olleolleolle avatar orien avatar renovate-bot avatar renovate[bot] avatar tooky avatar vincent-psarga avatar yusuke-noda avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.