Skip to content

Commit 4e1ce2b

Browse files
committed
Add explainer for test groups
1 parent 5de3a98 commit 4e1ce2b

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

tests/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,22 @@ exclude `@DatabaseLive` group. Or make a copy of **phpunit.dist.xml** -
6060
call it **phpunit.xml** - and comment out the `<testsuite>` named `Database`. This will make
6161
the tests run quite a bit faster.
6262

63+
## Groups
64+
65+
Each test class that we are running should belong to at least one
66+
[@group](https://phpunit.readthedocs.io/en/9.5/annotations.html#group) that is written at class-level
67+
doc block.
68+
69+
The available groups to use are:
70+
71+
| Group | Purpose |
72+
| --------------- | --------------------------------------------------------------------- |
73+
| AutoReview | Used for tests that perform automatic code reviews |
74+
| CacheLive | Used for cache tests that need external services (redis, memcached) |
75+
| DatabaseLive | Used for database tests that need to run on actual database drivers |
76+
| SeparateProcess | Used for tests that need to run on separate PHP processes |
77+
| Others | Used as a "catch-all" group for tests not falling in the above groups |
78+
6379
## Running the tests
6480

6581
The entire test suite can be run by simply typing one command-line command from the main directory.

0 commit comments

Comments
 (0)