PHPackages                             de-swebhosting/typo3-extension-buildtools - 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. de-swebhosting/typo3-extension-buildtools

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

de-swebhosting/typo3-extension-buildtools
=========================================

Contains scripts to test and release TYPO3 Extensions

v10.3.0(4y ago)220.1k17GPL-3.0-or-laterShellCI passing

Since Mar 13Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/astehlik/typo3-extension-buildtools)[ Packagist](https://packagist.org/packages/de-swebhosting/typo3-extension-buildtools)[ RSS](/packages/de-swebhosting-typo3-extension-buildtools/feed)WikiDiscussions TYPO3\_14 Synced 2d ago

READMEChangelog (4)Dependencies (6)Versions (12)Used By (7)

TYPO3 Extension build tools
===========================

[](#typo3-extension-build-tools)

Test your TYPO3 Extensions with the utilities provided by the TYPO3 core using:

- the `typo3/testing-framework` package
- `docker` and `docker-compose`
- the `typo3gmbh/php*` docker images

**Hint 1:** currently each version of the tools only supports **one** TYPO3 core version.

**Hint 2:** currently the Composer dependencies must be installed in the `.Build` directory. See [doc/composer-sample.json](doc/composer-sample.json) for the needed configuration.

Install
-------

[](#install)

### Edit `composer.json`

[](#edit-composerjson)

Adjust the settings in your `composer.json` file as described in [doc/composer-sample.json](doc/composer-sample.json).

After that run `composer update`.

### Require dynamically

[](#require-dynamically)

If you want to test multiple core versions you can require different versions of the buildtools dynamically during your build process.

For TYPO3 10:

```
composer require --dev de-swebhosting/typo3-extension-buildtools:dev-master
```

For TYPO3 9:

```
composer require --dev de-swebhosting/typo3-extension-buildtools:dev-TYPO3_9
```

Run locally
-----------

[](#run-locally)

Before you can execute a script locally, you need to set your Extension key as an environment variable:

```
export TYPO3_EXTENSION_KEY=""
```

After that you can run the different commands.

- `t3_run_tests.sh` - For running Unit, Functional and Acceptance tests
- `t3_check_codestyle.sh` - For checking / fixing PHP code style via [PHP\_CodeSniffer](https://github.com/PHPCSStandards/PHP_CodeSniffer)
- `t3_prepare_release.sh` - Prepare docs and `ext_emconf.php` for a release
- `t3_deploy_to_ter.sh` - Upload Extension to TER

Run in travis
-------------

[](#run-in-travis)

Have a look at the [doc/travis-sample.yml](doc/travis-sample.yml) file. You need to

1. replace `` with the Extension key of your extension
2. remove `[your_custom_codestyle]` or replace it with the name of the ruleset you want to use for the code style checker (see [Code style checking](#code-style-checking)).

The Example Travis CI config will

- validate the `composer.json` file
- check the code style of your PHP code
- run Unit Tests for PHP 7.3 and 7.4
- run functional Tests for PHP 7.3 and 7.4
- run PHP linting for PHP 7.3 and 7.4
- run acceptance tests for PHP 7.3 and 7.4

It will also try to deploy your Extension to TER when a tag is pushed. You need to set your TYPO3 login data in Travis environment variables for this to work (see [Deploy to TER](#deploy-to-ter)).

- `TYPO3_ORG_USERNAME`
- `TYPO3_ORG_PASSWORD`

Write tests
-----------

[](#write-tests)

### Unit test

[](#unit-test)

To write a unit test create the folder `Tests/Unit` in your Extension and add your first test case by extending `TYPO3\TestingFramework\Core\Unit\UnitTestCase`:

```
namespace Vendor\MyExt\Tests\Unit;

use TYPO3\TestingFramework\Core\Unit\UnitTestCase;

class MyFirstUnitTest extends UnitTestCase {
...
}
```

### Functional test

[](#functional-test)

To write a functional test create the folder `Tests/Functional` in your Extension and add your first functional test case by extending `TYPO3\TestingFramework\Core\Functional\FunctionalTestCase`:

```
namespace Vendor\MyExt\Tests\Functional;

use TYPO3\TestingFramework\Core\Functional\FunctionalTestCase;

class MyFirstFunctionalTest extends FunctionalTestCase {
...
}
```

Execute tests
-------------

[](#execute-tests)

For executing Unit tests, run this command:

```
.Build/bin/t3_run_tests.sh -s unit -p ""
```

For executing functional tests, run this command:

```
.Build/bin/t3_run_tests.sh -s functional -d "" -p ""
```

`` can be:

- `mariadb`
- `mssql`
- `postgres`
- `sqlite`

Acceptance testing
------------------

[](#acceptance-testing)

### Frontend

[](#frontend)

You can find some boilerplate code for acceptance testing in the [doc/acceptance](doc/acceptance) folder.

Copy the [codeception.yml](doc/acceptance/codeception.yml) file into your Extension's `Tests` folder and

adjust the configured namespace.

The [frontend](doc/acceptance/frontend) subfolder contains a skeletton for creating a Frontend test suite.

Copy all files and folders from this directory to the `Tests/Acceptance` folder of your Extension and adjust

the namespaces in all files.

After that you should be able to run your first acceptance test (located in the [Frontend](doc/acceptance/frontend/Frontend) subdirectory).

```
.Build/bin/t3_run_tests.sh -s acceptance -a Frontend
```

### Backend

[](#backend)

The setup for Backend acceptance testing is quite similar to the Frontend.

Copy the contents of the [backend](doc/acceptance/backend) folder into the `Tests/Acceptance` folder of your Extension and you are good to go.

The acceptance test command executes the Backend testsuite by default:

```
.Build/bin/t3_run_tests.sh -s acceptance
```

### Debugging

[](#debugging)

Add these to the config of the `web` service in the `docker-compose.yml` to temporarily enable Development context for better debug output in the Frontend and the possibility to access the webserver from your local machine

Important! For this to work you need to add the `--service-ports` flat to the `docker-compose` command

in `t3_run_tests.sh`. The final command looks like this:

```
docker-compose run --service-ports acceptance_backend_mariadb10
```

This config needs to be added to the `docker-compose.yml` file:

```
  web:
    ...
    ports:
      - "8000:8000"
    ...
    environment:
      TYPO3_CONTEXT: Development
```

Code style checking
-------------------

[](#code-style-checking)

To execute code style checks, you can use this command:

```
.Build/bin/t3_check_codestyle.sh
```

It checks all known locations of PHP files in TYPO3 Extensions with some default configuration based on the TYPO3 core coding guidelines.

You can adjust the ruleset, by adding `Tests/CodeSniffer/MyCodingStandard/ruleset.xml` to your Extension.

This is an example to use the default rules and disable line length checking for TCA configuration files:

```

	Based on PSRDefault. Adjust only if REALLY neccessary!

		Configuration/TCA/*

```

After you created the ruleset, you *must* provide its name to the code style checker:

```
.Build/bin/t3_check_codestyle.sh MyCodingStandard
```

To automatically fix code style errors, you can pass the `fix` keyword as first parameter:

```
.Build/bin/t3_check_codestyle.sh fix [MyCodingStandard]
```

Deploy to TER
-------------

[](#deploy-to-ter)

Use the `t3_prepare_release.sh` script, to prepare a release:

```
bash .Build/bin/t3_prepare_release.sh ""
```

This will set the provided version number in `ext_emconf.php` and `Documentation/Settings.cfg` and create a new release using the `git flow release` commands.

After that you can push all branches and tags. The pushed tag will be published to TER.

```
git push && git push --tags && git checkout develop && git push
```

Credits
-------

[](#credits)

This work is based on the TYPO3 testing framework and the awesome documentation at

###  Health Score

46

—

FairBetter than 92% of packages

Maintenance61

Regular maintenance activity

Popularity30

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 99.3% 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 ~185 days

Total

5

Last Release

1564d ago

Major Versions

v9.0.0 → v10.1.02020-04-22

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/956513?v=4)[Alexander Stehlik](/maintainers/astehlik)[@astehlik](https://github.com/astehlik)

---

Top Contributors

[![astehlik](https://avatars.githubusercontent.com/u/956513?v=4)](https://github.com/astehlik "astehlik (133 commits)")[![rodrigoprimo](https://avatars.githubusercontent.com/u/77215?v=4)](https://github.com/rodrigoprimo "rodrigoprimo (1 commits)")

### Embed Badge

![Health badge](/badges/de-swebhosting-typo3-extension-buildtools/health.svg)

```
[![Health](https://phpackages.com/badges/de-swebhosting-typo3-extension-buildtools/health.svg)](https://phpackages.com/packages/de-swebhosting-typo3-extension-buildtools)
```

###  Alternatives

[magento/magento2-functional-testing-framework

Magento2 Functional Testing Framework

15312.0M36](/packages/magento-magento2-functional-testing-framework)[lucatume/wp-browser

A set of Codeception modules to test WordPress projects.

6424.1M182](/packages/lucatume-wp-browser)[slevomat/coding-standard

Slevomat Coding Standard for PHP\_CodeSniffer complements Consistence Coding Standard by providing sniffs with additional checks.

1.5k134.0M2.3k](/packages/slevomat-coding-standard)[drupal/core-dev

require-dev dependencies from drupal/drupal; use in addition to drupal/core-recommended to run tests from drupal/core.

2022.6M343](/packages/drupal-core-dev)

PHPackages © 2026

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