Problem/Motivation
This issue might need to be moved to a policy project, but I'm not sure which one.
KernelTestBaseTest looks like this:
/**
* @coversDefaultClass \Drupal\KernelTests\KernelTestBase
* @group PHPUnit
*/
class KernelTestBaseTest extends KernelTestBase {
BrowserTestBaseTest looks like this:
/**
* Tests BrowserTestBase functionality.
*
* @coversDefaultClass \Drupal\Tests\BrowserTestBase
* @group browsertestbase
*/
class BrowserTestBaseTest extends BrowserTestBase {
The sharp-eyed among you will notice that they have different groups, and neither group satisfies the semi-formal standards we have for @group annotations: #2297541: Secondary/additional test @group names
Furthermore it means that we can't just run tests about tests using @group annotations.
The semi-formal standard is that the first @group annotation should be either the module name or a 'component,' which in practice means the last part of the namespace of the thing being tested.
There are probably other examples of tests which aren't annotated very well.
A glance over the output of $ ./vendor/bin/phpunit -c core/ --list-groups shows that browsertestbase and PHPUnit really do stick out as out-of-place, so maybe it's not as bad as it seems.
Proposed resolution
- Come up with useful categories which might also fit our annotation standard, such as @group testing, so that a dev can run all tests relating to tests.
- Fix annotations depending on the decisions above. This could include secondary annotations.
Remaining tasks
Make group annotations more usable: #2296615: Accurately support multiple @groups per test class
Comments
Comment #7
quietone commentedTriaging issues in simpletest.module to determine if they should be in the Simpletest Project or core.
This looks like it a Phpunit issue, changing component.
Comment #13
quietone commentedI am closing this as a duplicate of a Coding Standards issue, #2297541: Secondary/additional test @group names