Our E2E tests are Cypress tests that start up our dotnet + EF backend, which is connected to a test postgres DB. In these tests, we need to log in as an admin user, so we need a way to add an admin user to the DB before the tests run. I'm worried about shipping production code that just checks if env.IsEnvironment("Test"))
before stuffing an admin user with credentials like username: test/password: test
into the DB- that seems risky. Is there a standard way of seeding test data outside of normal app execution?
mardi 21 janvier 2020
Safely seeding test DB for E2E testing in dotnet core
Inscription à :
Publier les commentaires (Atom)
Aucun commentaire:
Enregistrer un commentaire