【问题标题】:Adding tag for examples in scenario outline (behave)在场景大纲中添加示例标签(行为)
【发布时间】:2017-10-26 23:30:34
【问题描述】:

是否可以使用行为在场景大纲中添加示例标签?像这样的东西。

Examples:
  |input     |output    |
  @test1
  |one       |two       |
  @test2
  |three     |four      |

当我尝试这样做时,我得到解析器错误:Parser failure in state next_scenario, at line 15: 'Examples:'

【问题讨论】:

  • 我认为|输入|输出|需要为两个表重复标题,并且应该在您使用的标签下方。
  • 我试着把例子:和|输入|输出|每个示例之前的标题,但它仍然不起作用。 :(
  • 什么是解析器错误
  • “解析器在 next_scenario 状态下失败,第 15 行:'示例:'”如果我每次都尝试重复标题。如果不是,它会在第一个示例中崩溃。
  • 看看这个 - github.com/behave/behave/issues/485,看来你正在尝试的东西没有正式发布但可用。

标签: python selenium python-behave


【解决方案1】:

此功能实际上在 Behave 的开发版本中可用,只是尚未在公开版本中可用。更多详情请参阅this Github issue。

答案最初由 cmets 中的@Grasshopper 提供。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2014-10-12
    • 1970-01-01
    • 2023-04-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-12
    • 1970-01-01
    相关资源
    最近更新 更多