跳至主要内容

为cucumber/behave提供标签表达式解析和评估逻辑

项目描述

CI Build Status Latest Version License

Cucumber标签表达式(Python版)。

logo

黄瓜标签表达式提供了一种易读的布尔表达式,以方便地选择Gherkin文件中带有标签的功能和场景。

# -- SIMPLE TAG-EXPRESSION EXAMPLES:
@a and @b
@a or  @b
not @a

# -- MORE TAG-EXPRESSION EXAMPLES:
@a and not @b
(@a or @b) and not @c

另请参阅

示例

黄瓜测试运行程序通过使用标签表达式选择一些场景,并运行它们

# -- TAG-EXPRESSION: @one and @two
# EXPECTED: Selects and runs scenario "Three".
$ my_cucumber_test_runner --tags="@one and @two" features/example.feature
...

# -- TAG-EXPRESSION: @one or @two
# EXPECTED: Selects and runs scenarios "One", "Two" and "Three".
$ my_cucumber_test_runner --tags="@one or @two" features/example.feature
...

使用以下功能文件

# -- FILE: features/example.feature
Feature: Tag-Expressions Example

  @one
  Scenario: One
    Given a step passes

  @two
  Scenario: Two
    Given another step passes

  @one @two
  Scenario: Three
    Given some step passes

  Scenario: Four
    Given another step passes

项目详情


下载文件

下载您平台上的文件。如果您不确定选择哪个,请了解有关安装包的更多信息。

源分布

cucumber-tag-expressions-6.1.0.tar.gz (37.8 kB 查看哈希)

上传时间

构建分布

cucumber_tag_expressions-6.1.0-py2.py3-none-any.whl (8.3 kB 查看哈希)

上传时间 Python 2 Python 3