I have a ASP WEB API 2 app that uses Entity Framework 6 code first. I want to make selenium tests that uses a test database that is created by migrations.
I want to use a test db because the routes that I want to tests are listed in a file and might change if a entity is deleted (some routes looks like /entityName/id). In short, I need to delete and migrate a test db every time I run the tests.
The only part that I don't get is how to make the API use the test db for the duration of the test.
I don't know if it'll helps but im using dbcontext.