piotr.gradzinski
piotr.gradzinski

Reputation: 923

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.

Upvotes: 4

Views: 5554

Answers (1)

Ocramius
Ocramius

Reputation: 25431

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

Upvotes: 17

Related Questions