Missing @group annotation

Created on 5 February 2024, 5 months ago
Updated 30 April 2024, about 2 months ago

Problem/Motivation

Listing tests on the command line errors out.

root@9c1cef395e52:/var/www# php web/core/scripts/run-tests.sh --list

Available test groups & classes
-------------------------------

Drupal\Core\Test\Exception\MissingGroupException: Missing @group annotation in Drupal\Tests\config_ignore\Kernel\IgnoreSchemaTest in /var/www/web/core/lib/Drupal/Core/Test/TestDiscovery.php:344
Stack trace:
#0 /var/www/web/core/lib/Drupal/Core/Test/TestDiscovery.php(173): Drupal\Core\Test\TestDiscovery::getTestInfo('Drupal\\Tests\\co...', '/**\n * Test the...')
#1 /var/www/web/core/scripts/run-tests.sh(82): Drupal\Core\Test\TestDiscovery->getTestClasses(NULL)
#2 {main}
Drupal\Core\Test\Exception\MissingGroupException: Missing @group annotation in Drupal\Tests\config_ignore\Kernel\IgnoreSchemaTest in /var/www/web/core/lib/Drupal/Core/Test/TestDiscovery.php:344
Stack trace:
#0 /var/www/web/core/lib/Drupal/Core/Test/TestDiscovery.php(173): Drupal\Core\Test\TestDiscovery::getTestInfo('Drupal\\Tests\\co...', '/**\n * Test the...')
#1 /var/www/web/core/scripts/run-tests.sh(82): Drupal\Core\Test\TestDiscovery->getTestClasses(NULL)
#2 {main}root@9c1cef395e52:/var/www# vim web/modules/contrib/config_ignore/tests/src/Kernel/IgnoreSchemaTest.php 

Steps to reproduce

Install config_ignore and list tests using the cli via php web/core/scripts/run-tests.sh --list

Proposed resolution

Add the @group annotation to the IgnoreSchemaTest test class.

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡³πŸ‡ΏNew Zealand Gold 20 minutes in the future

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Gold
  • Merge request !21Add the @group annotation to the test class. β†’ (Merged) created by Gold
  • Pipeline finished with Failed
    5 months ago
    Total: 328s
    #87608
  • Status changed to RTBC 3 months ago
  • πŸ‡ΊπŸ‡ΈUnited States Daniel Korte Brooklyn, NY

    Confirmed. This fixes the issue.

  • Status changed to Postponed: needs info 2 months ago
  • πŸ‡¨πŸ‡­Switzerland bircher πŸ‡¨πŸ‡Ώ

    Tests pass fine on dupal ci without this.
    The group annotation doesn't hurt, but I also don't see any added value of having it.

  • πŸ‡ΊπŸ‡ΈUnited States Daniel Korte Brooklyn, NY

    @bircher I think the added value here is being able to run the core/scripts/run-tests.sh script without errors caused by this module. Testing is not limited to just drupal ci. This fix is essential to other CI pipelines where the Drupal core test script is being used.

  • Status changed to Fixed 2 months ago
  • πŸ‡¨πŸ‡­Switzerland bircher πŸ‡¨πŸ‡Ώ

    I see, you run tests of your site with the core test run script.
    While I would strongly suggest not to do that and set up your tests with DTT, I understand that you may have a legacy setup you need to work with, I don't want to stand in your way. But do yourself a favour and start migrating to DTT and just plain phpunit tests for things that don't need a running Drupal site.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024