For a lot of developers, myself included, testing your Drupal code can be a bit of an afterthought. Today we're happy to announce the release of a series of tutorials that might change how you feel about that.
Our guide to Automated Testing in Drupal 8 was largely written by Paul Mitchum. Paul (Mile23 on drupal.org) has done work on Drupal's continuous integration project, is an active core contributor, and is one of the maintainers of the Examples project among his other roles.
This set of tutorials starts with helping explain why testing is a good idea in the first place and then takes a look at the different types of tests that ship with Drupal core and the various frameworks that makes those tests possible. After that bit of groundwork orientation is done we'll learn how test files are organized in the Drupal codebase and how we can run existing tests using a few different methods. Once we know how to execute our test suite, we'll dig into implementation examples for functional and unit tests.
Here is the full list of tutorials in our guide to Testing in Drupal 8:
- Introduction to Testing in Drupal
- Software Testing Overview
- Frameworks for Testing in Drupal
- Install Drupal Development Requirements with Composer
- Organize Test Files
- Run Drupal Tests with Simpletest UI and run-tests.sh
- Run Drupal Tests with PHPUnit
- Set up a Functional Test
- Implement a Functional Test
- Implement Drupal Functional Test Dependencies
- Implement a Unit Test in Drupal
- Set up PhantomJS to Run Functional JavaScript Tests
- Convert Tests from Simpletest to PHPUnit
Coming soon, we'll have more Docker tutorials!
Add new comment