godog/features/formatter/events.feature
Mark Hughes 7017c73ef8
Provide a useful implementation of something compatible with testing.T (#571)
* Attempting to provide a useful implementation of something compatible with testing.T

* Handle Fail calls on the TestingT in the right place

* Provide as much of testing.T as possible + tidy up

* Add initial tests for testingT support

* Check compatibility with testing.T and friends

Co-authored-by: Piotr Bocheński <bochenski.piotr@gmail.com>

* Update assert-godogs example to show new usage. Rename 'GetTestingT(ctx)' to 'T(ctx)'

* Update changelog and readme with new usage

* Improve test coverage

* Review updates

---------

Co-authored-by: Piotr Bocheński <bochenski.piotr@gmail.com>
2024-04-29 10:26:25 +02:00

77 строки
2,1 КиБ
Gherkin

Feature: event stream formatter
In order to have universal cucumber formatter
As a test suite
I need to be able to support event stream formatter
Scenario: should fire only suite events without any scenario
Given a feature path "features/load.feature:4"
When I run feature suite with formatter "events"
Then the following events should be fired:
"""
TestRunStarted
TestRunFinished
"""
Scenario: should process simple scenario
Given a feature path "features/load.feature:27"
When I run feature suite with formatter "events"
Then the following events should be fired:
"""
TestRunStarted
TestSource
TestCaseStarted
StepDefinitionFound
TestStepStarted
TestStepFinished
StepDefinitionFound
TestStepStarted
TestStepFinished
StepDefinitionFound
TestStepStarted
TestStepFinished
TestCaseFinished
TestRunFinished
"""
Scenario: should process outline scenario
Given a feature path "features/load.feature:35"
When I run feature suite with formatter "events"
Then the following events should be fired:
"""
TestRunStarted
TestSource
TestCaseStarted
StepDefinitionFound
TestStepStarted
TestStepFinished
StepDefinitionFound
TestStepStarted
TestStepFinished
StepDefinitionFound
TestStepStarted
TestStepFinished
TestCaseFinished
TestCaseStarted
StepDefinitionFound
TestStepStarted
TestStepFinished
StepDefinitionFound
TestStepStarted
TestStepFinished
StepDefinitionFound
TestStepStarted
TestStepFinished
TestCaseFinished
TestCaseStarted
StepDefinitionFound
TestStepStarted
TestStepFinished
StepDefinitionFound
TestStepStarted
TestStepFinished
StepDefinitionFound
TestStepStarted
TestStepFinished
TestCaseFinished
TestRunFinished
"""