python-behave

    0热度

    1回答

    是否可以添加标签使用的行为在方案概述实例的例子吗?像这样的东西。 Examples: |input |output | @test1 |one |two | @test2 |three |four | 当我尝试这样做,我得到解析器错误:Parser failure in state next_scenario, at line 15:

    1热度

    1回答

    @then('I should be able to able to print with id "{el_id}"') def step_impl(context, el_id): if is_element_id_there(context, 'el_id'): print(get_element_text_id(context, 'el_id')) else

    2热度

    1回答

    我们可以在没有'Given'的情况下写'Scenario',并直接以'When'开头吗? 更多介绍: “背景”部分已经在它需要的测试场景的状态。 因此,我只是想直接开始'时',并执行一些操作。

    0热度

    1回答

    我是Behave BDD的新手。我想根据在命令行中传递的标签来进行一些逻辑。当我做context.tags/context.scenario.tags时,我会得到在该场景中定义的所有标签。我怎样才能得到只有那些从命令行传递 由于提前

    0热度

    1回答

    步骤之间传递参数我有多个示例场景轮廓看起来像这样: Examples: | country | type | number | | Poland | An individual | - | | Poland | Company | 8971660890 | | Germany | An individual | - | | France | Company

    1热度

    1回答

    遇到麻烦尝试检查一个字段是否在表中存在与否: | category | info | | Electrician | 74300 Paris 04 50 65 43 21 | 比方说,我的表通常包含一个“名称”字段,但在这种特定情况下它不包含。在这种情况下,如何检查“名称”字段的存在?

    0热度

    3回答

    是否有办法编写适用于多个关键字的步骤?好比说我的特点是: Scenario: Something happens after navigating Given I navigate to "/" And say some cookie gets set When I navigate to "/some-other-page" Then something

    1热度

    1回答

    的子情况我有一个sample.feature文件以下情形定义,场景与使用Examples语法两个子情况: @ninja Scenario Outline: this is a sample scenario Given ... And ... And .. When ... Then ... Examples: |

    1热度

    1回答

    创建JSON对象: behave sample.feature --format json --out file_name.json 上述命令提供了含有所有方案结果的单个JSON文件。但是我需要多个json来表示功能文件中列出的所有场景,而不是单个json。 是否有任何实现的逻辑来获得这个或任何东西来添加在这里。

    0热度

    1回答

    我想在behave.ini文件中替换--junit命令行参数,其他参数(如-D和format = plain)工作正常。但--junit不工作对我来说,请看下面的命令, behave --junit --junit-directory Reports/results behave.ini/ [behave] junit=True junit-directory=Reports/resul