You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The purpose of Given steps is to put the system in a known state, by initialising the local db or logging in a test user. Docs
feature("Some feature") {
scenario("Some scenario") {
given("The user is logged in") {
// initialise logged in user
}
given("The user email is ${someValue}") {
// set user email to be "someValue"
}
}
}
The text was updated successfully, but these errors were encountered:
We can also favor utilizing "background" here to create a pre condition for all scenarios.
Ideally in my opinion we should approach the issue on UI level only and avoid having steps like "The user is logged in"
Instead that could be replaced by a background scenario that does:
Background:
Given you see the login screen
Then fill "user1" on edit text "username"
Then fill "123" on edit text "pass"
Then press login button
Playing a bit also with @BeforeStep and @afterstep we could make it so a tester alone can write any test without any developer work plus this way all steps are performed on the UI like a tester would and there is no under the hood state setup.
The purpose of Given steps is to put the system in a known state, by initialising the local db or logging in a test user.
Docs
The text was updated successfully, but these errors were encountered: