Reputation: 137574
Where can I read the SpecFlow documentation that tells me about the [BeforeScenario]
and [BeforeTestRun]
attributes and when they all run?
Upvotes: 1
Views: 1801
Reputation: 1304
Below is the spec flow getting started link. https://specflow.org/getting-started/
Upvotes: 0
Reputation: 103
[BeforeTestRun]
and [AfterTestRun]
represents the code that will be executed before and after all tests[BeforeFeature]
and [AfterFeature]
represents the code that will be executed before and after every feature[BeforeScenario]
and [AfterScenarion]
represents the code that will be executed before and after every scenario inside a feature[BeforeScenarioBlock]
and [AfterScenarioBlock]
represents the code that will be executed before and after every scenario blockBelow you can see an example of a scenario with 3 blocks. The test will be executed before and after Given/When/Then blocks :
[BeforeScenarioStep]
and [AfterScenarioStep]
represents the code that will be executed before and after every scenario stepFurther information regarding using and setting up hooks in SpecFlow you can find below:
SpecFlow - Using Hooks in your Tests
Upvotes: 4
Reputation: 10209
There is some basic info here: http://www.specflow.org/documentation/Hooks/
Upvotes: 8