H
H
HellWalk2019-01-28 19:01:24
Codeception
HellWalk, 2019-01-28 19:01:24

Codeception - how to disable database cleanup after running tests?

The documentation says the following:

In the file tests/acceptance.suite.yml
modules:
    enabled:
        - PhpBrowser:
            url: http://test.loc
        - \Helper\Acceptance
        - Db:
             dump: 'tests/_data/test.sql'
             populate: true
             cleanup: true
             reconnect: true

- populate - whether to load the dump before running the test suite
- cleanup - whether to restore the database from the dump before each test
- reconnect - whether the module should reconnect to the database before each test

It is not clear from the text which setting is responsible for deleting data after running the tests, but in any case I tried them all - the data from the database is deleted after the tests.
How to actually disable the cleanup of the database after running the tests?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavlvdv, 2021-03-17
@Pavlvdv

If you are using Yii2, add transaction: false to Yii2 configuration ( https://codeception.com/for/yii )

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question