The Home for Magento 2 Excellence

Automated build tests for Magento 2 modules. Explore. Evaluate. Elevate. #magento2

1059 Modules
741 Ready
317 Need Help
Vendors 🏆 Leaderboard
Actively Maintained v0.0.4 OSL-3.0

Yireo Live Test Runner for Magento 2

yireo/magento2-live-test-runner 73

Runs PHPUnit-based "live" tests against a real Magento environment, booting the full application (database, caching) so developers can debug and verify behaviour on a copy of a production site.

5
Downloads
Below average
4
GitHub Stars
Below average
6d ago
Last Release
0
Open Issues
Build Issues
0/3 checks passed

Build Tests

Composer Install
– DI Compile
– Templates

Code Quality

CS Coding Standard
PHPStan Failed

Release Discipline

Follows SemVer · 100% What is this?

Release history audited up to v0.0.4

Tested on Magento 2.4.9

Recent Test History

Each release is tested against the latest Magento version at that time.

v0.0.4 on Magento 2.4.9
Nov 25, 2026
v0.0.3 on Magento 2.4.9
Jun 1, 2026

Looking for Contributors

Composer installation fails. Your contribution could help the entire Magento community!

Contribute

Share This Module's Status

Yireo Live Test Runner for Magento 2 Magento compatibility status badge

README

Loaded from GitHub

Yireo Live Test Runner for Magento 2

This module allows you to run PHPUnit-based live tests in Magento 2. Normally, PHPUnit-based code focuses on creating unit tests, integration tests, functional tests and other. But what if you simply want to debug an issue in a copy of a production site? Not a controlled clean environment, but the real deal. To guarantee that certain functionality remains, testing makes sense here as well. Hence the dubbed live tests.

A live test is nothing more than a PHPUnit test, but including the Magento application (including database, caching and other) as a bootstrap. With this, you can fetch products from the database and guarantee that their

Installation

Install this module as a development dependency, so that it (and PHPUnit) does not end up in production deployments:

composer require --dev yireo/magento2-live-test-runner

Usage

Create your own tests within a folder Test/Live (or something else). Next, run the following command, pointing towards your testing folder:

bin/magento yireo_livetest:run app/code/Foo/Bar/Test/Live

Done.

The testing folder needs to be located within the Magento root folder.

Production mode

Live tests run with full access to the Magento application and its database, so they are able to modify or delete real data. Therefore, the command refuses to run when Magento is in production mode. If you are sure what you are doing (for instance, on a copy of a production site), add the --force flag:

bin/magento yireo_livetest:run app/code/Foo/Bar/Test/Live --force

Tests could be extending upon the parent classes \Yireo\LiveTestRunner\TestCase\CatalogTestCase and \Yireo\LiveTestRunner\TestCase\GenericTestCase, but only if you want to: You can make any assertions using any library out there. This module simply makes sure the Magento bootstrap of your actual dev environment is run.

Current status

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.