PHPUnit based testsuite for Magento 1 (unit- and integrationtests and framework migrated from Magento 2)
HTML PHP XSLT Batchfile Shell JavaScript
Latest commit fbabac2 Jun 24, 2016 @vadimjustus vadimjustus committed on GitHub Merge pull request #35 from troggybrains/github
[FIX] Fixed issue that when using this module, installation could fai…
Failed to load latest commit information.
doc @ 9daefce Update documentation Jun 30, 2014
.gitignore Add Magento_Exception to src/lib; Issue #6 and #4 Jun 30, 2014
build.xml Added build.xml Stub for usage with internal build and deployment pro… Jun 13, 2014
composer.lock Add some changes for better backwards compatibility Jun 22, 2016

PHPUnit based testsuite for Magento 1

This project aims to bring the core tests and the important parts of the Magento 2 testsuite to Magento 1.

Please refer to the blog post (German) for further information.

With the TechDivision_MagentoUnitTesting framework located at src/dev/tests/unit/framework is it possible to reach 100% unit test coverage for Magento 1.

How to use


Copy the whole content of the src directory to your Magento project.

composer install


We recommend to create an own phpunit xml file if you want write tests only for your own module. You will find an example file ( in src/dev/tests/unit/ directory, which is a good beginning. That example xml also includes the html coverage report which is a must-have while writing your tests.


Execute your tests with the following command:

php dev/tests/phpunit-3.7.37.phar -c dev/tests/unit/

Replace dev/tests/unit/ with your own xml file, if you create one.

To display the coverage report browse the following url:


Writing tests

To use the framework you have to extend your test classes from TechDivision_MagentoUnitTesting_TestCase_Abstract or an other testcase class which is extended from the abstract class. All testcases are located at src/dev/tests/unit/framework/TechDivision/MagentoUnitTesting/TestCase

Documentation for testing framework

Feel free to open an issue.