Replies: 1 comment 2 replies
-
would be good to have some details to your config and setup. but if i assume you use symfony and doctrine and doing a functional test:
actor: FunctionalTester
modules:
enabled:
- Symfony:
url: 'http://localhost/'
app_path: 'src'
var_path: 'var'
environment: 'test'
- Doctrine2:
depends: Symfony
cleanup: true # All doctrine queries will be wrapped in a transaction, which will be rolled back at the end of each test there you have the that said i would like to warn you to do so. having fixtures of tests preserved through multiple tests can have sideeffects. so if a test looks in the database and count the "items" which should be a specific number and another test creates one extra item the test will fail or succseeed if the tests are in the "right" order (first checking for the count, then running the test which creates a new item). your tests should not rely on a specific execution order. there is even a setting in settings:
...
shuffle: true
... if you have fixtures which are the same all the time like the data to fill all "cities" for a dropbox this data can be quite static. you can load it with events https://codeception.com/docs/08-Customization (scroll down to events or use a bundle for it |
Beta Was this translation helpful? Give feedback.
-
while doing automated acceptance testing, suppose if a form data is filled and submitted. now the new test data that are created in the system, get deleted after a few seconds. Can I get a suggestion, on how to store the test data permanantly?
Beta Was this translation helpful? Give feedback.
All reactions