Question

I recently added tests to Cache Register, but the test runner on drupal.org doesn't seem to be picking them up. The tests are all located in tests/src/Kernel (repo) but aren't queuing up in the issue queue for either patches or merge requests. Am I missing something?

EDIT: Current answer references the namespace of the base test class, but that's no longer relevant. I refactored that Base class into a testing Trait instead and made sure that the remaining "real" tests use the proper namespace. Everything runs locally but still not getting picked up by the runner as far as I can tell.

Was it helpful?

Solution

If I look at https://www.drupal.org/project/cache_register/issues/3184391 , there is no option for me to test/retest a patch.

That tells me that you don't have testing configured for your project. To do that, you need to go to https://www.drupal.org/node/3183102/qa and choose "Add test / retest", then configure a test with the Drupal version, PHP version, database type/version that you want and choose when the test gets run. Once you submit that new test, it should immediately run. If you select "issue testing default" when you configure the test, then that configuration will run for Needs Review patches in your issue queue, and that will be the configuration that will run if someone in the issue queue manually triggers a test.

I don't see anything obviously wrong with the tests themselves, but it is clear that you don't have tests configured to run so it doesn't matter if the tests are working or not ...

Licensed under: CC-BY-SA with attribution
Not affiliated with drupal.stackexchange
scroll top