- Drupal 8 Development Cookbook(Second Edition)
- Matt Glaman
- 97字
- 2025-04-04 18:20:50
Running specific tests
Each example so far has used the all option to run every Simpletest available. There are various ways to run specific tests:
- --module: This allows you to run all the tests of a specific module
- --class: This runs a specific path, identified by a full namespace path
- --file: This runs tests from a specified file
- --directory: This run tests within a specified directory
Previously in Drupal, tests were grouped inside the module.test files, which is where the file option derives from. Drupal 8 utilizes the PSR-4 autoloading method and requires one class per file.