---
title: "Codeception: Automated Testing for PHP"
lang: en
type: knowledge
canonical: https://www.arocom.de/en/knowledge/development/codeception
alternate: https://www.arocom.de/wissen/entwicklung/codeception
author: "Axel Roth"
last_updated: 2026-07-29
---

# Codeception: Automated Testing for PHP

Codeception is a PHP test framework that combines unit tests, functional
tests and browser-based acceptance tests in a single tool. It builds on
PHPUnit and extends it with a readable test syntax. Since 2012, arocom
has used automated tests in Drupal projects to ensure quality and catch
regressions early.

## Codeception: Automated Testing for PHP Projects

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](https://www.arocom.de/en/services/drupal-upgrade) 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](https://www.arocom.de/en/future-check) evaluates
the test coverage of your platform. Starting at EUR 2,500
plus VAT, credited toward the follow-up project.

**From arocom projects:**

- [haustec.de](https://www.arocom.de/en/references/haustec), a trade portal with daily editorial output, we tuned with Varnish, Redis, and Drupal's internal cache to keep LCP under 1.5 s, even at peak traffic.
- Hopt + Schuler needs job openings on the careers page in real time, sourced from the JobCluster system. We delivered this via a custom module against the JobCluster API, vacancies appear without manual upkeep, the recruiting workflow runs centrally in JobCluster, the site reads live.

### 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](https://www.arocom.de/en/knowledge/drupal/behat-tests): Acceptance testing for Drupal
- [DevOps](https://www.arocom.de/en/knowledge/development/devops): Automation in development
- [Git Hooks](https://www.arocom.de/en/knowledge/development/git-hooks): Automation in the workflow
