0
votes

I have started to create unit tests for small components and added them to a Tests subdirectory within the component directory - so everything is together. No functional or acceptance tests are needed for these simple small components.

But I have not found out how to tell Codeception to run all tests in a directory - I am looking for a similar method like in the PHPUnit config file, where I can just tell PHPUnit to go through all PHP files in a directory (<directory>src/*/*/*/Tests</directory> in PHPUnit XML config).

Also, there does not seem to be a reference for possible configuration options in Codeception - so it is really hard to find more advanced configuration options such as these. Or have I missed something?

1

1 Answers

0
votes

http://codeception.com/docs/08-Customization#One-Runner-for-Multiple-Applications

In your case it would be:

include:
  - src/*/*/*

But you will have to create a codeception.yml and at least one test suite for each component.

Look at https://github.com/Codeception/symfony-demo/blob/2.2/codeception.yml and https://github.com/Codeception/symfony-demo/tree/2.2/src/AppBundle for an example.