Develop
- Local server setup
- Development tools
- Using Composer
- Git version control system
- Managing a drupal.org theme, module, or distribution project
- Security
- Drupal project issues
- Usability testing
- Profiling Drupal
- [Obsolete] Coding standards
- User interface standards
- Theming Drupal
- Creating custom modules
- Drupal APIs
- Automated Testing
- Upgrading and converting Drupal 7 modules
- Core modules and themes
- External Libraries in Core
- Mobile guide
- Decoupled Drupal
Automated testing
Introduction
Drupal comes with various automated testing options to choose from, most of which are part of the core testing framework. The enriched functionalities and UI are provided by the new testing framework, PHPUnit. Testing can be done in different layers in order to confirm the quality and reaction of code on edge cases:
- Unit tests
- Kernel tests
- Functional tests
It is also possible to use an external framework like Behat with scenarios in Gherkin syntax.
PHPUnit in Drupal
Execute and write tests using Drupal's implementation of PHPUnit.
- PHPUnit Browser test tutorial
- PHPUnit Javascript testing tutorial
- PHPUnit file structure, namespace, and required metadata
- Running PHPUnit tests
- Running PHPUnit Javascript tests
- Running PHPUnit tests within PhpStorm
- Understanding PHPunit expectations
- Unit testing more complicated Drupal classes
- Using Prophecy
- Comparison with PHPUnit mocks
- Agile Unit Testing
- Creating custom assertion messages
- Mocking Entities and Services with PHPUnit and Mocks
- Setup tasks in Kernel tests
- Working with user sessions in tests
- Making HTTP requests programmatically in Kernel tests
Browser testing using Cypress
Test modern apps directly in the browser
Converting SimpleTests to PHPUnit tests
Some notes on converting SimpleTest-based tests to PHPUnit tests.
JavaScript testing using Nightwatch
This documentation describes how to write Nightwatch tests
Performance tests
Drupal comes with a cutting-edge performance testing framework out of the box.
Run core development checks
On every merge request and patch submitted to Drupal a series of checks are run before testing. Learn how to run them locally.
Types of tests
Defines the type of tests, Unit, Kernel, Browser and Javascript tests.
Test failures
Tips for dealing with test failures.