Skip to content

How to execute particular scenario or feature ? #462

Answered by vearutop
ilterpehlivan asked this question in Q&A
Discussion options

You must be logged in to vote

Hello, could you share your command and what did you get as a result?

For example if you run

go test -run ^Test_AllFeaturesRunAsSubtests$/^should_run_a_normal_outline$

in godog repo, it will only execute

  Scenario: should run a normal outline

Please keep in mind, that you need to change spaces to underscores (this is a limitation coming from how subtests are implemented in Go).

If in doubt how scenario name is translated to subtest name, you can run full suite with -v flag, for example

go test -run ^Test_AllFeaturesRunAsSubtests$ -v
=== RUN   Test_AllFeaturesRunAsSubtests
=== RUN   Test_AllFeaturesRunAsSubtests/should_filter_scenarios_having_Y_and_Z_tags
=== RUN   Test_AllFeaturesRunAs…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@ilterpehlivan
Comment options

@vearutop
Comment options

@ilterpehlivan
Comment options

@vearutop
Comment options

@ilterpehlivan
Comment options

Answer selected by ilterpehlivan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants