testing - Test database isolation with Behat 3, Doctrine 2 and Symfony 2 -
i introducing functional behat tests on symfony2/doctrine2 application , deciding how handle database isolation , data fixtures.
are there pitfalls setting separate test environment own separate mysql database gets populated dump import prior execution of behat test suite, , emptied after suite execution? i'm trying avoid using data fixtures unless need save time of manually writing foreign key relations , not.
any guidance appreciated.
as far symfony/doctrine/behat concerned , if want 1 of follows best practises then:
- you should isolate environment dev, test, prod, stag ... setting isolated environments symfony application base build folder structure header.
- you should isolate test database , use sqlite instead of mysql performance purposes. using multiple sqlite entity managers multiple bundles , databases in test environment, can use one.
- you should use fixtures give flexibility , rid of burden of manual processing. not try avoid using them! creating doctrine data fixtures in symfony
- so on ..... check posts in site read on myself.
Comments
Post a Comment