PHPackages                             eliashaeussler/typo3-codeception-helper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. eliashaeussler/typo3-codeception-helper

ActiveLibrary[Testing &amp; Quality](/categories/testing)

eliashaeussler/typo3-codeception-helper
=======================================

Helper functions for Codeception tests within TYPO3 extensions

2.0.0(6mo ago)6163.4k↓44.7%1[3 issues](https://github.com/eliashaeussler/typo3-codeception-helper/issues)6GPL-2.0-or-laterPHPPHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0CI passing

Since Jul 16Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/eliashaeussler/typo3-codeception-helper)[ Packagist](https://packagist.org/packages/eliashaeussler/typo3-codeception-helper)[ RSS](/packages/eliashaeussler-typo3-codeception-helper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (9)Dependencies (14)Versions (11)Used By (6)

TYPO3 Codeception Helper
========================

[](#typo3-codeception-helper)

[![Coverage](https://camo.githubusercontent.com/83429ff766037f22853bd635b872553b32fc66b9cb83a3f9c44061fc00584c9e/68747470733a2f2f696d672e736869656c64732e696f2f636f766572616c6c73436f7665726167652f6769746875622f656c6961736861657573736c65722f7479706f332d636f646563657074696f6e2d68656c7065723f6c6f676f3d636f766572616c6c73)](https://coveralls.io/github/eliashaeussler/typo3-codeception-helper)[![CGL](https://camo.githubusercontent.com/4cb0dea101b881f18cf759d8a85f45b64af9f6c8ab7ee0e79820fa98920c3e46/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f656c6961736861657573736c65722f7479706f332d636f646563657074696f6e2d68656c7065722f63676c2e79616d6c3f6c6162656c3d63676c266c6f676f3d676974687562)](https://github.com/eliashaeussler/typo3-codeception-helper/actions/workflows/cgl.yaml)[![Tests](https://camo.githubusercontent.com/6a9b4d348fa6fac42b5cfca846e2212772b900236579c634422606edf7d5fc74/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f656c6961736861657573736c65722f7479706f332d636f646563657074696f6e2d68656c7065722f74657374732e79616d6c3f6c6162656c3d7465737473266c6f676f3d676974687562)](https://github.com/eliashaeussler/typo3-codeception-helper/actions/workflows/tests.yaml)[![Supported PHP Versions](https://camo.githubusercontent.com/484e6a5332bb10387caf2f31684ba4af6486635366e081419d13e8e97469c745/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f646570656e64656e63792d762f656c6961736861657573736c65722f7479706f332d636f646563657074696f6e2d68656c7065722f7068703f6c6f676f3d706870)](https://packagist.org/packages/eliashaeussler/typo3-codeception-helper)

This library provides some helper functions for [Codeception](https://codeception.com/)tests within TYPO3 extensions. In addition, an application entrypoint modifier extension for coverage collection within acceptance tests is distributed.

🔥 Installation
--------------

[](#-installation)

[![Packagist](https://camo.githubusercontent.com/d2211dab032289df7771dcf5980e242f1ab8aa7c20b8ae04631aeae91bd16d8e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656c6961736861657573736c65722f7479706f332d636f646563657074696f6e2d68656c7065723f6c6162656c3d76657273696f6e266c6f676f3d7061636b6167697374)](https://packagist.org/packages/eliashaeussler/typo3-codeception-helper)[![Packagist Downloads](https://camo.githubusercontent.com/30a2a5677c262f66b1e6e258faf09b1dc24774aa67dc7532c0f20e6f6b9a8169/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656c6961736861657573736c65722f7479706f332d636f646563657074696f6e2d68656c7065723f636f6c6f723d627269676874677265656e)](https://packagist.org/packages/eliashaeussler/typo3-codeception-helper)

```
composer require --dev eliashaeussler/typo3-codeception-helper
```

⚡ Usage
-------

[](#-usage)

### `ApplicationEntrypointModifier` extension

[](#applicationentrypointmodifier-extension)

> Source: [`Codeception\Extension\ApplicationEntrypointModifier`](src/Codeception/Extension/ApplicationEntrypointModifier.php)

A Codeception extension that aims to ease the integration effort when collecting code coverage with [`codeception/c3`](https://github.com/Codeception/c3). It replaces an existing entrypoint (e.g. `typo3/index.php`) with a modified entrypoint that includes the distributed `c3.php` file.

Enable this extension in your `codeception.yml` file:

```
# codeception.yml

extensions:
  enabled:
    - EliasHaeussler\Typo3CodeceptionHelper\Codeception\Extension\ApplicationEntrypointModifier:
        entrypoints:
          - web-dir: .Build/web
            main-entrypoint: index.php
            app-entrypoint: app.php
          - web-dir: .Build/web/typo3
            main-entrypoint: index.php
            app-entrypoint: app.php
            optional: true
```

For each entrypoint, the following config must be provided:

Config nameDescriptionDefault value`web-dir`Relative path from project root to directory that contains the main entrypoint–`main-entrypoint`Name of the entrypoint to replace (the file being accessed by the web server)`index.php``app-entrypoint`Name of the original relocated entrypoint (the renamed main entrypoint)`app.php``optional`Set to `true` if a non-existent main entrypoint can be ignored`false`#### Example

[](#example)

Given the following directory structure:

```
.Build
└── web
    └── index.php   # main entrypoint provided by framework/application

```

Once the extension is enabled and properly configured, the following directory structure exists after the test suite is started:

```
.Build
└── web
    ├── app.php     # contains the original contents from index.php
    └── index.php   # generated entrypoint that includes c3.php and app.php

```

### `Backend` module

[](#backend-module)

> Source: [`Codeception\Module\Backend`](src/Codeception/Module/Backend.php)

A Codeception module that allows to perform actions within TYPO3 backend. It can for example be used to log into the TYPO3 backend.

Note

This module requires the [`WebDriver`](https://codeception.com/docs/modules/WebDriver)module to be installed and enabled.

Enable this module in your `codeception.yml` file:

```
# codeception.yml

suites:
  Acceptance:
    actor: AcceptanceTester
    modules:
      enabled:
        - EliasHaeussler\Typo3CodeceptionHelper\Codeception\Module\Backend
```

#### Available methods

[](#available-methods)

**`login($username, $password): void`**

Perform backend login for the given user. The user is identified by the given username and is authenticated by the given password.

Example:

```
$I->login('admin', 'password');
```

**`loginAs($username): void`**

Perform backend login for the given user. The user is identified by the given username which must be configured in the codeception module config (see [Configure backend users](#configure-backend-users)).

Example:

```
$I->loginAs('admin');
```

**`openModule($identifier): void`**

Open a backend module by clicking on the module link. The module link is identified by a given node identifier. Note that the identifier differs between TYPO3 versions (see example below).

Example:

```
// TYPO3 11
$I->openModule('#web_list');

// TYPO3 12
$I->openModule('[data-modulemenu-identifier="web_list"]');
```

**`scrollToElementInModule($identifier, $offsetX = 0, $offsetY = 0): void`**

Scroll to a given element, identified by the given node identifier, inside the current backend module. This circumvents issues with Codeception's native `WebDriver::scrollTo()` method which does not support scrolling inside frames.

Example:

```
$I->openModule('[data-modulemenu-identifier="web_list"]');
$I->scrollToElementInModule('tr[data-table="tt_content"]');
```

#### Configure backend users

[](#configure-backend-users)

Note

Backend users are not automatically created by this module. You need to take care of that by your own, e.g. by [importing static database fixtures](https://codeception.com/docs/modules/Db#SQL-data-dump)before tests are executed.

In order to use the `loginAs()` method, existing backend users must be configured in the module config section:

```
 suites:
   Acceptance:
     actor: AcceptanceTester
     modules:
       enabled:
-        - EliasHaeussler\Typo3CodeceptionHelper\Codeception\Module\Backend
+        - EliasHaeussler\Typo3CodeceptionHelper\Codeception\Module\Backend:
+            userCredentials:
+              admin: password
+              editor: password
```

🧑‍💻 Contributing
----------------

[](#‍-contributing)

Please have a look at [`CONTRIBUTING.md`](CONTRIBUTING.md).

⭐ License
---------

[](#-license)

This project is licensed under [GNU General Public License 2.0 (or later)](LICENSE).

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance71

Regular maintenance activity

Popularity38

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 78.1% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~107 days

Recently: every ~89 days

Total

9

Last Release

181d ago

Major Versions

1.3.0 → 2.0.02025-11-18

PHP version history (5 changes)1.0.0PHP ~8.1.0 || ~8.2.0

1.1.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0

1.1.2PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0

1.3.0PHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

2.0.0PHP ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/144cefe55242b883c87cb537463f3ba75a0f8198fc5b602b50c838aae31fe7ee?d=identicon)[eliashaeussler](/maintainers/eliashaeussler)

---

Top Contributors

[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (461 commits)")[![eliashaeussler](https://avatars.githubusercontent.com/u/16313625?v=4)](https://github.com/eliashaeussler "eliashaeussler (129 commits)")

---

Tags

codeceptionextensiontypo3

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/eliashaeussler-typo3-codeception-helper/health.svg)

```
[![Health](https://phpackages.com/badges/eliashaeussler-typo3-codeception-helper/health.svg)](https://phpackages.com/packages/eliashaeussler-typo3-codeception-helper)
```

###  Alternatives

[vimeo/psalm

A static analysis tool for finding errors in PHP applications

5.8k77.5M6.7k](/packages/vimeo-psalm)[infection/infection

Infection is a Mutation Testing framework for PHP. The mutation adequacy score can be used to measure the effectiveness of a test set in terms of its ability to detect faults.

2.2k26.2M1.8k](/packages/infection-infection)[behat/behat

Scenario-oriented BDD framework for PHP

4.0k96.8M2.0k](/packages/behat-behat)[phpbench/phpbench

PHP Benchmarking Framework

2.0k13.0M627](/packages/phpbench-phpbench)[lucatume/wp-browser

A set of Codeception modules to test WordPress projects.

6343.8M153](/packages/lucatume-wp-browser)[maglnet/composer-require-checker

CLI tool to analyze composer dependencies and verify that no unknown symbols are used in the sources of a package

99810.9M671](/packages/maglnet-composer-require-checker)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
