问题
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