I'm automating a web application and I have 2 things there :
An administrator side, typically used for creating users, managing users, modifying the content etc (the list goes on)
A user login side to view such content etc.
How do I handle the automated testing for this? do I start by setting up the test via the administrator UI to create a user, then navigate to the user side, login and verify what I need?
Would you typically setup the test by inserting a user into the database and using them for any user-side tests? Inserting via the DB for any administrators when testing that side?
I'm confused on where the flow of a test should truly begin,
- Login as admin
- Create user, setup appropriate privs all via UI
- Login as said user, execute the test
- Verify the results
Seems very long winded, should i just setup a user in the DB as step 1 and then verify any user-side functionality that way ? repeating the above for the administrator side and never doing a full flow through both sides if that makes sense?