Tests cannot be filtered by @group when running with _phpunit_concurrent=1
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3388185. --> Reported by: [jonathan1055](https://www.drupal.org/user/92645) Related to !47 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Changes in <span class="drupalorg-gitlab-issue-link project-issue-status-info project-issue-status-7"><a href="https://www.drupal.org/project/gitlab_templates/issues/3384581" title="Status: Closed (fixed)">#3384581: Improve concurrency: replace experimental package with core script</a></span> mean that when running a phpunit step with _PHPUNIT_CONCURRENT=1 the tests are executed using core's <code>run-tests.sh</code> script instead of a direct call to <code>phpunit</code>. This has created (at least) two separate side-effects</p> <ol> <li>Arguments passed via <code>_PHPUNIT_EXTRA</code> are not necessarily common between the two scripts. Switching between _PHPUNIT_CONCURRENT=0 and _PHPUNIT_CONCURRENT=1 is no longer a simple toggle, and the value of _PHPUNIT_EXTRA may need to differ</li> <li>The set of tests to be run can no longer be filtered. This used to be possible by passing <code>--group something</code></li> </ol> <p>A temporary solution for contib maintainers is to leave _PHPUNIT_CONCURRENT=0 to preserve existing behavior.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Add a new template variable <code>_PHPUNIT_TESTGROUPS</code> which can take three types of value:</p> <ul> <li><code>--all</code> to execute all tests (this is the pre-filled default)</li> <li>a comma-separated list of test @group(s) to execute</li> <li>no value (empty) - if the test groups are provided by other customisations, such as running via a parallel job matrix</li> </ul> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <h3 id="summary-ui-changes">User interface changes</h3> <h3 id="summary-api-changes">API changes</h3> <h3 id="summary-data-model-changes">Data model changes</h3> > Related issue: [Issue #3384581](https://www.drupal.org/node/3384581)
issue