how can I get a quick count of the number of scenarios and steps in a large cucumber suite without running every test?

天大地大妈咪最大 提交于 2019-12-13 02:22:27

问题


I've tried cucumber --dry-run, but it only seems to work on a per feature file basis.


回答1:


cucumber --dry-run will include the count of scenarios and steps for all features run.

For example,

Given two feature files:

test.feature:

Feature: 1

    Scenario: 1a
    Given step 1
    Given step 2

    Scenario: 1b
    Given step 1
    Given step 2    

test2.feature:

Feature: 2

    Scenario: 2
    Given step 1

When cucumber --dry-run is run, the results show:

3 scenarios (3 skipped)
5 steps (5 skipped)

As you can see, the scenario and step counts are including all scenarios from all features.



来源:https://stackoverflow.com/questions/18004326/how-can-i-get-a-quick-count-of-the-number-of-scenarios-and-steps-in-a-large-cucu

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!