I tried to write tests for custom modules and I found that registry database table is not populated with .test files and thus admin/config/development/testing displays only one SimpleTest test. I tried to rebuild registry with http://drupal.org/project/registry_rebuild but there is still no files. Is this a Drupal 7.19 bug?

2 Answers 2


Do you by any chance have the contrib 'simpletest' module installed? (as opposed to the core simpletest module that comes bundled with drupal 7)

I had the same problem you have.

What fixed it for me was uninstalling simpletest. Than completely deleting the the contrib simpletest module. Then reinstall simpletest (with the contrib module gone, this will install the core module)

And voila, my test classes started showing up in the registry and all is peachy :)

  • I found that I have installed (by mistake?) contributed SimpleTest 2.x module. After remove everythink works great. Did you have any problems with uninstalling core Sipletest module with some cache clearing function missing? Feb 19, 2013 at 9:28
  • If the simpletest contributed module is installed (version 2.x), you need to add the testing_api = 2.x to the module.info file, otherwise simpletest will not recognize your test.
    – Ursula
    Nov 26, 2013 at 2:39

_registry_update() adds to the Drupal registry only the files that are referred from the module .info file, and simpletest_test_get_all() looks for any class whose name is present in the registry database, and contained in a file matching the SQL pattern %.test. Those classes need to implement the method getInfo(), and not to depend on modules that don't exist.

If all those conditions are met, then the test class is shown in the list of the tests.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.