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.

test_run_finished_event.feature 1.1 kB

2 years ago
12345678910111213141516171819202122232425262728293031323334353637383940
  1. Feature: Test Run Finished
  2. This event is fired after all the test cases have been executed.
  3. Typically, a formatter would use this to print out summary information.
  4. At the moment this event contains no data, but it could be extended
  5. in the future to carry the summary information for the convenience
  6. of formatter authors.
  7. Background:
  8. Given the standard step definitions
  9. And a file named "features/test.feature" with:
  10. """
  11. Feature: A feature
  12. Scenario: A passing scenario
  13. Given this is a step
  14. """
  15. And a file named "features/support/events.rb" with:
  16. """
  17. class MyFormatter
  18. def initialize(config)
  19. config.on_event :test_case_finished do
  20. config.out_stream.puts "test case finished"
  21. end
  22. config.on_event :test_run_finished do
  23. config.out_stream.puts "the end"
  24. end
  25. end
  26. end
  27. """
  28. Scenario: Run the test case
  29. When I run `cucumber -q -f MyFormatter`
  30. Then it should pass with:
  31. """
  32. test case finished
  33. the end
  34. """

No Description

Contributors (1)