Sha256: 86c8cf55b7ed85068b9f069f5e9fec7890ddb1d45acd74ddff847c7c7ac612d1

Contents?: true

Size: 1.18 KB

Versions: 3

Compression:

Stored size: 1.18 KB

Contents

Feature: Test Case Finished Event

  This event is fired after each scenario or examples table row (generally named a 
  Test Case) has finished executing. You can use the event to learn about the 
  result of the test case.

  See [the API documentation](http://www.rubydoc.info/github/cucumber/cucumber-ruby/Cucumber/Events/TestCaseFinished) for more information about the data available on this event.

  Scenario: Test case passes
    Given the standard step definitions
    And a file named "features/passing.feature" with:
      """
      Feature: A feature
        Scenario: A scenario
          Given this step passes
      """
    And a file named "features/support/events.rb" with:
      """
      AfterConfiguration do |config|
        config.on_event :test_case_finished do |event|
          config.out_stream.puts "Results"
          config.out_stream.puts "-------"
          config.out_stream.puts "Test case: #{event.test_case.name}"
          config.out_stream.puts "The result is: #{event.result}"
        end
      end
      """
    When I run `cucumber`
    Then it should pass with:
      """
      Results
      -------
      Test case: A scenario
      The result is: ✓
      """

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cucumber-3.0.1 features/docs/events/test_case_finished_event.feature
cucumber-3.0.0 features/docs/events/test_case_finished_event.feature
cucumber-3.0.0.pre.2 features/docs/events/test_case_finished_event.feature