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:

  1. you should isolate environment dev, test, prod, stag ... setting isolated environments symfony application base build folder structure header.
  2. 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.
  3. you should use fixtures give flexibility , rid of burden of manual processing. not try avoid using them! creating doctrine data fixtures in symfony
  4. so on ..... check posts in site read on myself.

behat 3 composer entries , behat.yml


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -