Ask HN: How do you populate a DB to demo your MVC project?
So, you need to demo (or QA) a version of your Django / Rails project. You run the test suite; all is good. You promote to your candidate branch and deploy on your staging server.
Now, do you:
* Load a bunch of fixtures?
* Use Factory Boy / Factory Girl (and if so, where is the code that makes it go?)?
* Grab data from your production DB (and if so, how?)?
* Create model instances manually as you go?
* Some other way?
It seems clear to me that fixtures are no longer the way. If the migration pace is anything but very slow, fixtures become the pain point of staging. Am I correct here?
My typical approach of late has been factory boy / girl, but this increases the amount of code to test and maintain quite substantially. Is there a better way?
This has a couple of side benefits:
- "Dry" run of the migrations you'll eventually need to run in production anyway
- Using real production data in staging/QA (as long as you're allowed to) can uncover some edge cases you wouldn't have accounted for using fixtures or manual prepopulation.