I am creating automation testing for a web app where users can store various information about their company (buildings info, employees etc)
Lets say I have a user form, where user fills some data about himself, and I have two scenarios:
- User form displays data correctly
I am populating database with all required data and I am checking if user form displays this data correctly (if database records match what we see in the form)
- Update user form data
I am again populating database with all required data (but this time only updating every input field with different data set)
Now when user press save, form gets reloaded with what should be updated data, now I need to compare this data again with database, I was doing it:
- populate database with required data
- display user form
- update user form
- press save
- compare database data with what we see in the form
But I discovered it is flawed approach, because in the back end of the website, updating logic is bugged, my scenario will still pass, what would be ideal approach to handle that?
I believe I should store (temporary for the duration of the test scenario) new data that I put in the user form (via website UI) and compare it, but should I better compare it with database, or user form data that would be retrieved from the database after user pressed save and form was reloaded, I can't see any difference, but I guess second approach would be faster.
Aucun commentaire:
Enregistrer un commentaire