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.

specifying_multiple_formatters.feature 2.0 kB

2 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. Feature: Running multiple formatters
  2. When running cucumber, you are able to using multiple different
  3. formatters and redirect the output to text files.
  4. Two formatters cannot both print to the same file (or to STDOUT)
  5. Background:
  6. Given a file named "features/test.feature" with:
  7. """
  8. Feature: Lots of undefined
  9. Scenario: Implement me
  10. Given it snows in Sahara
  11. Given it's 40 degrees in Norway
  12. And it's 40 degrees in Norway
  13. When I stop procrastinating
  14. And there is world peace
  15. """
  16. Scenario: Multiple formatters and outputs
  17. When I run `cucumber --no-color --format progress --out progress.txt --format pretty --out pretty.txt --no-source --dry-run --no-snippets features/test.feature --publish-quiet`
  18. Then the stderr should not contain anything
  19. Then the file "progress.txt" should contain:
  20. """
  21. UUUUU
  22. 1 scenario (1 undefined)
  23. 5 steps (5 undefined)
  24. """
  25. And the file "pretty.txt" should contain:
  26. """
  27. Feature: Lots of undefined
  28. Scenario: Implement me
  29. Given it snows in Sahara
  30. Given it's 40 degrees in Norway
  31. And it's 40 degrees in Norway
  32. When I stop procrastinating
  33. And there is world peace
  34. 1 scenario (1 undefined)
  35. 5 steps (5 undefined)
  36. """
  37. Scenario: Two formatters to stdout
  38. When I run `cucumber -f progress -f pretty features/test.feature`
  39. Then it should fail with:
  40. """
  41. All but one formatter must use --out, only one can print to each stream (or STDOUT) (RuntimeError)
  42. """
  43. Scenario: Two formatters to stdout when using a profile
  44. Given the following profiles are defined:
  45. """
  46. default: -q
  47. """
  48. When I run `cucumber -f progress -f pretty features/test.feature`
  49. Then it should fail with:
  50. """
  51. All but one formatter must use --out, only one can print to each stream (or STDOUT) (RuntimeError)
  52. """

No Description

Contributors (1)