Automated Testing of Drupal 8 Modules

https://www.drupal.org/phpunit
The testing framework PHPUnit was added to Drupal 8 in June of 2013. Simpletest is still supported but should only be used for web tests and DrupalUnitTest’s that require a complete or partial Drupal environment.

The plans for Drupal 9 were mentioned to me in IRC. It will be several years before that point is reached and certain types of tests cannot be done in PHPUnit yet so knowing how to use Simpletest isn’t invalid. Also, Drupal itself needs to be transitioned to a more component based model to be able to completely phase out Simpletest.

1 Like