Codeception: Automated Testing for PHP Projects
Last updated: March 2026 · Reading time: 6 minutes
Every change to a Drupal platform can have unintended side effects. Automated tests catch errors before they reach production. Codeception makes this especially convenient for PHP projects.
What Codeception Offers
Codeception combines three test levels in one framework:
Unit tests. Test individual classes and methods in isolation. Codeception uses PHPUnit under the hood and extends it with mocking and stub functions.
Functional tests. Test application logic without a browser. HTTP requests are simulated, forms submitted and responses checked — fast and without browser overhead.
Acceptance tests. Test the application in a real browser. Codeception controls Chrome or Firefox via WebDriver and simulates real user interactions.
Codeception in Drupal Projects
Drupal comes with its own PHPUnit-based test framework. Codeception complements it with browser-based acceptance tests that verify behavior from the user's perspective.
Typical test scenarios: login processes, form validation, content creation by editors, access permissions and search functions. These tests run automatically with every deployment and prevent regressions.
Why Automated Testing Pays Off
Early error detection. Tests find errors before users do. This saves support effort and protects your reputation.
Safe updates. Drupal updates and module upgrades can be applied with confidence when a test suite covers the core functions.
Documentation. Tests describe the expected behavior of the application. New team members understand more quickly how the platform is supposed to work.
Quality Assurance for Your Platform?
arocom implements automated tests as part of the development methodology. The Future Check evaluates the test coverage of your platform. Starting at EUR 2,500 plus VAT, credited toward the follow-up project.
What is the difference between Codeception and PHPUnit?
PHPUnit is the standard framework for unit tests in PHP. Codeception builds on PHPUnit and extends it with functional tests and browser-based acceptance tests. For Drupal projects, both complement each other.
How long does it take to build a test suite?
A basic test suite for the most important user journeys can be implemented in a few days. The effort grows with the complexity of the platform. The investment pays off through reduced error costs.
Can tests be retrofitted into existing projects?
Yes. Tests can be added incrementally — starting with the most critical functions. A complete retrofit is more labor-intensive than developing tests from the start, but it's worth it.
Read more
- Behat Tests — Acceptance testing for Drupal
- DevOps — Automation in development
- Git Hooks — Automation in the workflow
Discover a random article
Questions about this topic? We'd love to help.
CMS Comparison 2025
Drupal vs. WordPress vs. TYPO3: An objective comparison for enterprise projects.
Was this article helpful?