-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
What are you trying to achieve?
We have a bug test suite which takes a lot of time to finish.
There are some tests that depend on each other (e.g. a test for creating an entity requires another test to register a user and verify a new user)
As the hole test suite takes a lot of time I want to run a specific test only (e.g. creating an entity) but everything I tried results in failure as the depend tests don't get executed.
In general Codeception is configured to run everything on ./vendor/bin/codecept run
.
So to run only specific SpotStatsBuildCest
which depends on others I tried the following:
Try 1:
./vendor/bin/codecept run SpotStatsBuildCest
Suite 'SpotStatsBuildCest' could not be found
Try 2:
./vendor/bin/codecept run --fail-fast ./test/integration/cest/SpotStatsBuildCest.php
Integration Tests (3) --------------------
S SpotStatsBuildCest: Run peak calculation job
S SpotStatsBuildCest: Send peak success calculation notification mail
S SpotStatsBuildCest: Send peak failed calculation notification mail
---------------------------------------------------------------------
Try 3:
Added a @group SpotStatsBuildCest
to the class and
./vendor/bin/codecept run --fail-fast --group SpotStatsBuildCest
[Groups] SpotStatsBuildCest
Integration Tests (3) --------------------
S SpotStatsBuildCest: Run peak calculation job
S SpotStatsBuildCest: Send peak success calculation notification mail
S SpotStatsBuildCest: Send peak failed calculation notification mail
---------------------------------------------------------------------
How can I run only this specific cest (+ dependencies)?