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_specific_scenarios.feature 2.0 kB

2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. Feature: Run specific scenarios
  2. You can choose to run a specific scenario using the file:line format,
  3. or you can pass in a file with a list of scenarios using @-notation.
  4. The line number can fall anywhere within the body of a scenario, including
  5. steps, tags, comments, description, data tables or doc strings.
  6. For scenario outlines, if the line hits one example row, just that one
  7. will be run. Otherwise all examples in the table or outline will be run.
  8. Background:
  9. Given the standard step definitions
  10. Scenario: Two scenarios, run just one of them
  11. Given a file named "features/test.feature" with:
  12. """
  13. Feature:
  14. Scenario: Miss
  15. Given this step is undefined
  16. Scenario: Hit
  17. Given this step passes
  18. """
  19. When I run `cucumber features/test.feature:6 --format pretty --quiet `
  20. Then it should pass with exactly:
  21. """
  22. Feature:
  23. Scenario: Hit
  24. Given this step passes
  25. 1 scenario (1 passed)
  26. 1 step (1 passed)
  27. """
  28. Scenario: Use @-notation to specify a file containing feature file list
  29. Given a file named "features/test.feature" with:
  30. """
  31. Feature: Sample
  32. Scenario: Passing
  33. Given this step passes
  34. """
  35. And a file named "list-of-features.txt" with:
  36. """
  37. features/test.feature:2
  38. """
  39. When I run `cucumber -q @list-of-features.txt`
  40. Then it should pass with:
  41. """
  42. Feature: Sample
  43. Scenario: Passing
  44. Given this step passes
  45. 1 scenario (1 passed)
  46. 1 step (1 passed)
  47. """
  48. Scenario: Specify order of scenarios
  49. Given a file named "features/test.feature" with:
  50. """
  51. Feature:
  52. Scenario:
  53. Given this step passes
  54. Scenario:
  55. Given this step fails
  56. """
  57. When I run `cucumber features/test.feature:5 features/test.feature:2 -f progress`
  58. Then it should fail with:
  59. """
  60. F.
  61. """

No Description

Contributors (1)