These are chat archives for Behat/Behat

24th
Sep 2014
Mitja O.
@Max101
Sep 24 2014 09:25
Hello guys! Im a relative beginner with Behat, Im using Behat 3 the latest one, could someone point me to a good spot where I could find some info about loading fixtures (say per scenario or feature) ?
Konstantin Kudryashov
@everzet
Sep 24 2014 10:22
@Max101 what are "fixtures" ?
Mitja O.
@Max101
Sep 24 2014 11:31
Amm Fixtures like in pregenerated database content?
https://github.com/nelmio/alice
I Actually found this today https://github.com/KnpLabs/FriendlyContexts/blob/master/doc/context-alice.md But I was wondering if there is maybe a better approach for this in Behat?
Konstantin Kudryashov
@everzet
Sep 24 2014 13:08
@Max101 pregenerated why?
Mitja O.
@Max101
Sep 24 2014 13:39
Amm I think we do not understand each other well, I mean, I would like to empty the database and fill in specific content after each feature or scenario is processed.
I can do that with FriendlyContexts, I was just wondering if maybe there is something like this already in Behat?
Something that would let me do Database operations before each test.
Konstantin Kudryashov
@everzet
Sep 24 2014 16:01
@Max101 clearing database is not about fixtures, it's about isolation. fill in specific content after each feature are fixtures. The question I am asking is why do you need these fixtures in the database after each feature?
Are they prerequisites for scenario working?
Mitja O.
@Max101
Sep 24 2014 16:08
Well I have a test environment set up which uses a test database, and yes I guess I would like to run some(not all) tests in isolation.
And, to do that I wanted to prefill the database before each scenario with fixtures..
Konstantin Kudryashov
@everzet
Sep 24 2014 22:53
@Max101 you need to have case isolation. That's the primary rule of testing. But fixtures - if your scenarios require some information as a prerequisite, why not state this information in scenario itself?