Is it possible to retrieve data from Scenario Outline Examples table in [BeforeTestRun], [BeforeFeature] or [BeforeScenario] hooks?
For example I have simple Scenario Outline like this one:
Scenario Outline: Login to website
Given Login form is displayed
When I fill <Login> and <Password>
Then I am successfully logged in
| Login | Password |
| user1 | password1 |
| user2 | password2 |
I want to use values from Examples table in [BeforeTestRun] or [BeforeFeature] hook.
Here is example with [BeforeTestRun] hook:
public static void PrepareTestUsersBeforeStart()
// code to prepare test data based on data in Scenario outline Examples table
// create user in our database with credentials from records in Examples table
// create user with Login "user1" and Password "password1" in our database
Thanks for advices or any suggestions how to solve this issue.
Please sign in to leave a comment.