【问题标题】:For behave, can I log the step text from inside the step definition为了表现,我可以从步骤定义中记录步骤文本吗
【发布时间】:2022-09-28 20:25:53
【问题描述】:

对于 Behave 中的一个步骤,是否有一些变量可以用来记录当前步骤文本? 例如

当我跑步时

@when(u\'I go running\')
def step_impl(context):
  log(f\'Behave().currentStepText}\')
  ...

    标签: python jbehave python-behave


    【解决方案1】:

    您可以将其他问题中提到的内容应用于您的问题:How to get the current behave step with Python?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-12-26
      • 2014-11-14
      • 1970-01-01
      相关资源
      最近更新 更多