Seeding database data for tests

A factory is about making it easy to inserts some data into the database. If it’s random or not is more about what you need. In a simple case it could just be a module, which you wrote, that does add some data to the db.