

When the person doing the testing is a developer, and can easily create different states.When you’d like to test using production data, without any of the risks (and in a GDPR-friendly way).When you expand the team to include a dedicated QA person.When you want to be able to test the exact state that a production user is in, in a test environment.When the data you want to mock is quite complex.Automate this through a command, or as part of your post deployment script.Use this database as your staging/test database.Iterate over all of your records, and apply a reasonable strategy to anonymise data.Replicate your production database elsewhere.For medium to large scale applications – this is well worth the effort. This strategy leaves you with dummy data that is almost identical to your production data, except anonymised. Avoid doing this: the configuration file ended up being more complex than what it replaced, rarely worked and wasn’t used. We tried to improve on this strategy by creating a UI + configuration-driven way of seeding different states.The “DummyDataSeeder” file can quickly and easily become one very long and hard to follow class.When the application was “small”, this strategy was an extremely quick way for developers to get into a productive, working state.When it’s not uncommon to want to recreate a user’s exact state on a test environment in order to better understand the issue.When it’s complicated and/or tedious to get the application into a particular state.When there are many different states your data can be in.
#Fake user data generator update
When it’s easy for whoever is doing the QA to update the seeder (ideal for when the developers are taking on the QA responsibility).
#Fake user data generator manual
