Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291890

Accurately support multiple @groups per test class

$
0
0

Follow-up to #697760: Replace getInfo() in tests with native phpDoc + annotations (following PHPUnit)

Objective

  1. Test classes may declare multiple @groups now, but Simpletest only uses the first @group on discovery.

  2. The Simpletest UI needs to be updated to support multiple groups per test.

  3. Affects both the web/UI table/list of tests as well as the CLI run-tests.sh --list [group].

Proposed solution (Test discovery mechanism)

Modify TestDiscovery so that it keeps an association between all group annotations and test classes/files.

Add a 'groups' key (plural) to the output of getTestInfo(), so that multiple groups can be described while leaving the 'group' key to work the same as before.

Proposed solution (Web UI)

Moved to follow-up: #2858652: Support multiple @group test annotations in Simpletest UI

TestDiscovery should still support the 'group' key in the same way, so BC can be preserved for the UI form.

Proposed solution (CLI)

  1. Allow the group parameter to find tests based on multiple @group annotations.

Viewing all articles
Browse latest Browse all 291890

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>