How to run a single test in Codeception?

Viewed 900

I am working with Codeception Acceptance Tests in docker containers. I can run the whole project, but I can't run single tests or classes. Is there any configuration option or parameter to solve this?

This works (run all tests):

codecept -c /app/web/codeception.yml run 

This does not work:

codecept -c /app/web/codeception.yml run SupplierFormCest (class name)
codecept -c /app/web/codeception.yml run Tests/SupplierFormCest  (Namespace path) 
codecept -c /app/web/codeception.yml run /app/web/tests/acceptance/SupplierFormCest (file path)

Error Message: Suite 'SupplierFormCest' could not be found

1 Answers

Looks like you need to specify the suite, acceptance, before the class name:

codecept -c /app/web/codeception.yml run acceptance SupplierFormCest
Related