...

/

Creating Database Fixtures

Creating Database Fixtures

Learn how to insert data before running tests.

Let’s make our home page tests more interesting by using database fixtures.

End-to-end test examples with database fixtures

When testing our applications, we cannot only rely on the user interface to make certain test scenarios possible. Often, we have to use fixtures to insert certain data into the database before we run our tests. When doing this, it is important to reset our database in between the tests before running each test. That way, we don’t accidentally have any leftover data in the database from previous tests that might interfere with our results. ...