Search code examples
testingyii2codeceptionyii2-extensionyii2-module

Yii2 Testing: How to run module tests along with main app test?


I want to run my main application Codeception tests and have it automatically go through the tests provided by 3rd party modules (assuming they come with their own Codeception configurations) installed through composer (which means they are living in the vendor/ folder).

I don't know how this can be done. Do I need to provide some kind of Codeception run parameters? Do I have to modify the bootstrap files? Does Codeception even support something like this?


Solution

  • Codeception can include other test suites by using include setting in codeception.yml

    Documentation: http://codeception.com/docs/08-Customization

    Example:

    include:
      - vendor/vendor1/lib1
      - vendor/vendor1/lib2
      - vendor/vendor2/lib3