There are certain commonalities between the various test suite types regarding what we need to do in order for Drupal (and PHPUnit) to be able to discover and run them.
First, we have the directory placement where the test classes should go in. The pattern is this--tests/src/[suite_type] where [suite_type] is a name of the test suite type this test should be. Also, it can be one of the following:
So, for example, unit tests would go inside the tests/src/Unit folder of our module.
Second, the test classes need to respect a namespace structure as well:
This is also pretty straightforward to understand.
Third, there is a certain metadata ...