Consider a somewhat old monolith application, there are no APIs available for the likes of creating users etc. In this instance which approach is best in terms of handling test data setup etc.
Prepopulate the database with data sets and have tests use specific data, restoring the database at the beginning of the pipeline so state is always set? obviously this has some down sides.
Input into the database as the tests are executing, e.g addUser(); would add a new user calling some Stored procedure or just run queries using JDBC.
Input the data using WebDriver itself, this one is insane..
What is the best approach? To me its pre populating the database with an assortment of accounts and using those directly in the tests, as a short term approach until APIs can be developed to aid with this process?