toumoro / tm-qa-tools
Ships a list of tools that runs and manages automated functional and acceptance tests from the backend or CLI.
Installs: 294
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 4
Language:TypeScript
Type:typo3-cms-extension
pkg:composer/toumoro/tm-qa-tools
Requires
- php: >=8.1
- helmich/typo3-typoscript-lint: ^3.3
- j13k/yaml-lint: ^1.1.6
- php-parallel-lint/php-console-highlighter: ^1.0.0
- php-parallel-lint/php-parallel-lint: ^1.4.0
- sclable/xml-lint: ^0.9.0
- typo3/cms-core: ^12.4.0 || ^13.4.0
- typo3/coding-standards: ^0.8.0
- typo3/testing-framework: ^9.2
Replaces
- typo3-ter/tm-qa-tools: dev-main
This package is not auto-updated.
Last update: 2025-11-05 19:34:29 UTC
README
tm_qa_tools -- Boîte à outils d’assurance qualité TYPO3
Un ensemble d'outils permettant d'automatiser la phase d'assurance qualité et d'appliquer les standards de codage dans les projets TYPO3.
Prérequis
Assurez-vous que ces variables d’environnement sont définies :
typo3DatabaseUsernametypo3DatabasePasswordtypo3DatabaseHosttypo3DatabaseName
Installation
composer req toumoro/tm-qa-tools --dev
Ensuite, ajoutez ces scripts dans le fichier composer.json de votre projet :
"scripts": { "post-autoload-dump": [ "@qa-tools-scripts" ], "post-install-cmd": [ "git init", "git config --local core.hooksPath .githooks/" ], "qa-tools-scripts": [ "chmod +x vendor/toumoro/tm-qa-tools/services/configure.sh", "vendor/toumoro/tm-qa-tools/services/configure.sh" ], "ci:php": [ "@ci:php:cs", "@ci:php:lint", "@ci:php:stan", "@ci:php:unit" ], "fix:php": [ "@fix:php:rector", "@fix:php:cs" ], "ci:php:cs": "php-cs-fixer fix --config=build/php-cs-fixer/php-cs-fixer.php -v --dry-run --using-cache no --diff", "ci:php:lint": "parallel-lint --show-deprecated --exclude vendor ./packages", "ci:php:stan": "phpstan analyse --ansi --no-progress --configuration=build/phpstan/phpstan.neon", "ci:lint:typoscript": "typoscript-lint ./packages --ansi -n --fail-on-warnings", "ci:lint:xml": "xmllint packages --pattern '*.xlf,*.svg' --ansi", "ci:lint:yaml": "yaml-lint packages/**/Configuration/*.yaml", "ci:php:unit": "phpunit -c ./build/phpunit/UnitTests.xml", "fix:php:cs": "php-cs-fixer fix --config=build/php-cs-fixer/php-cs-fixer.php", "fix:php:rector": [ "rector process --clear-cache" ] }
Puis mettez à jour le fichier .gitignore :
.php-cs-fixer.cache /build/phpunit/.phpunit.result.cache
Exemple d’utilisation
Analyser le code PHP pour détecter les problèmes de style et erreurs
composer ci:lint:typoscript
Corriger le code PHP (appliquer les standards de codage)
composer fix:php
Vérifier le code TypoScript
composer ci:lint:typoscript
Lancer tous les tests avec le script dédié
chmod +x ./build/Scripts/runTests.sh # Lancer tous les tests ./build/scripts/runTests.sh -p 8.2 # Lancer un test spécifique ./build/scripts/runTests.sh -p 8.2 -- --filter PageActionsTest
Tests UI avec Playwright
Les tests Playwright sont disponibles sous le domaine :
playwright-${YOUR_DOMAIN}
Extensibilité
Pour les tests fonctionnels, vous pouvez ajouter un chemin personnalisé vers un fichier de fixtures et le configurer via l’option d’extension fixturesPath.
Pour les tests Playwright, vous pouvez ajouter vos tests personnalisés dans une extension existante ou dans une nouvelle.
Il est essentiel d’ajouter le chemin du dossier de tests à votre fichier docker-compose-cloud.yml afin de garantir leur bonne exécution.
EN
tm_qa_tools -- TYPO3 Quality Assurance Toolkit
A set of tools to automate quality checks and enforce coding standards for TYPO3 projects.
Requirements
Make sure these environment variables are set:
typo3DatabaseUsernametypo3DatabasePasswordtypo3DatabaseHosttypo3DatabaseName
Installation
composer req toumoro/tm-qa-tools --dev
Then add these scripts to your project's composer.json file:
"scripts": { "post-autoload-dump": [ "@qa-tools-scripts" ], "post-install-cmd": [ "git init", "git config --local core.hooksPath .githooks/" ], "qa-tools-scripts": [ "chmod +x vendor/toumoro/tm-qa-tools/services/configure.sh", "vendor/toumoro/tm-qa-tools/services/configure.sh" ], "ci:php": [ "@ci:php:cs", "@ci:php:lint", "@ci:php:stan", "@ci:php:unit" ], "fix:php": [ "@fix:php:rector", "@fix:php:cs" ], "ci:php:cs": "php-cs-fixer fix --config=build/php-cs-fixer/php-cs-fixer.php -v --dry-run --using-cache no --diff", "ci:php:lint": "parallel-lint --show-deprecated --exclude vendor ./packages", "ci:php:stan": "phpstan analyse --ansi --no-progress --configuration=build/phpstan/phpstan.neon", "ci:lint:typoscript": "typoscript-lint ./packages --ansi -n --fail-on-warnings", "ci:lint:xml": "xmllint packages --pattern '*.xlf,*.svg' --ansi", "ci:lint:yaml": "yaml-lint packages/**/Configuration/*.yaml", "ci:php:unit": "phpunit -c ./build/phpunit/UnitTests.xml", "fix:php:cs": "php-cs-fixer fix --config=build/php-cs-fixer/php-cs-fixer.php", "fix:php:rector": [ "rector process --clear-cache" ] }
Then update .gitignore file:
# ....
.php-cs-fixer.cache
/build/phpunit/.phpunit.result.cache
Example Usage
Analyze PHP code for style issues and errors
composer ci:lint:typoscript
Fix PHP code (Apply coding standards)
composer fix:php
Check TypoScript code for errors
composer ci:lint:typoscript
Run all tests using the command:
chmod +x ./build/Scripts/runTests.sh # Run all ./build/scripts/runTests.sh -p 8.2 -d mysql # Run a specific test ./build/scripts/runTests.sh -p 8.2 -d mysql -- --filter PageActionsTest
Tests UI avec Playwright
Playwright tests are available under playwright-${YOUR_DOMAIN}.
Extensibility
For functional tests, you can add a custom fixtures file path and then configure it under the extension configuration setting fixturesPath.
For Playwright tests, you can add your custom tests in an existing extension or in a new one.
It's essential to add the tests folder path to your docker-compose-cloud.yml file to ensure they are properly executed.