Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Test data generator for symfony2 with doctrine2

I'm facing a common problem with generating data sets for testing purpose in my application. I've found many tools which provides raw data generation (http://www.webresourcesdepot.com/test-sample-data-generators/) but I'm looking for something more sophisticated.

I have a symfony2 with doctrine2 project. Entities are defined with proper relations - one to one, one to many, many to many. Is there any solution which will provide automatic data generation based on those entities? Maybe it's too much, maybe not. Thanks for any hints.

like image 281
piotr.gradzinski Avatar asked Dec 05 '22 12:12

piotr.gradzinski


1 Answers

You should look into:

  • Doctrine data fixtures - loads fixtures and allows you to clear tables at each test run
  • Alice - allows you to load fixtures from csv/yaml/xml/etc
  • Faker - allows you to generate random data by seed - integrates with data-fixtures
like image 154
Ocramius Avatar answered Dec 09 '22 03:12

Ocramius