You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

run_scenarios_matching_name.feature 1.7 kB

2 years ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. Feature: Run feature elements matching a name with --name/-n
  2. The `--name NAME` option runs only scenarios which match a certain
  3. name. The NAME can be a substring of the names of Features, Scenarios,
  4. Scenario Outlines or Example blocks.
  5. Background:
  6. Given a file named "features/first.feature" with:
  7. """
  8. Feature: first feature
  9. Scenario: foo first
  10. Given missing
  11. Scenario: bar first
  12. Given missing
  13. """
  14. Given a file named "features/second.feature" with:
  15. """
  16. Feature: second
  17. Scenario: foo second
  18. Given missing
  19. Scenario: bar second
  20. Given missing
  21. """
  22. Given a file named "features/outline.feature" with:
  23. """
  24. Feature: outline
  25. Scenario Outline: baz outline
  26. Given outline step <name>
  27. Examples: quux example
  28. | name |
  29. | a |
  30. | b |
  31. """
  32. Scenario: Matching Scenario names
  33. When I run `cucumber -q --name foo`
  34. Then it should pass with:
  35. """
  36. Feature: first feature
  37. Scenario: foo first
  38. Given missing
  39. Feature: second
  40. Scenario: foo second
  41. Given missing
  42. 2 scenarios (2 undefined)
  43. 2 steps (2 undefined)
  44. """
  45. Scenario: Matching Scenario Outline names
  46. When I run `cucumber -q --name baz`
  47. Then it should pass with:
  48. """
  49. Feature: outline
  50. Scenario Outline: baz outline
  51. Given outline step <name>
  52. Examples: quux example
  53. | name |
  54. | a |
  55. | b |
  56. 2 scenarios (2 undefined)
  57. 2 steps (2 undefined)
  58. """

No Description

Contributors (1)