-
Notifications
You must be signed in to change notification settings - Fork 11
Overview
Whilst there have previously been test frameworks made available for Magento, none of these have previously included any test coverage of the Magento core, and so adoption has been low as it has historically been difficult to pinpoint if failing tests are due to bugs in the underlying Magento platform.
Mage_Test was created in order to offer an easy to use unit and integration test framework, in a "standard" package namespace, that also comes with a fundamental suite of tests covering every core module inside of Magento.
Mage_Test came about by leveraging the work of 3 different open source projects :
First, the EcomDev_PHPUnit test framework was adopted and adapted, so as to fit into the Mage_Test namespace. This provided the fundamental building blocks for Mage_Test, but didn't provide any tests providing coverage of Magento itself.
The tests for Magento itself came from the Magento2 project. Obviously, these tests were designed against the Magento2 platform, and with a different test framework in mind. Thankfully, adapting the Magento2 tests to make use of the new Mage_Test framework wasn't difficult at all - however, the process of "fixing" the Magento2 tests so that they are relevant to Magento is an ongoing process. If you would like to help with this, please see the contributing page.
Finally, Collin Mollenhour's modman extension provides the symlinking "magic" necessary for Mage_Test to seamlessly retrofit itself and it's test suite into Magento.
In the coming weeks and months, we hope to finish converting the existing Magento2 unit tests to work with Mage_Test, and then address increasing code coverage for each Magento core module, starting with modules that have been identified as highest risk (by static code analysis) first.
Mage_Test also offers the ability for developers, integrators and 3rd party module developers to add tests into their own modules, which can by run by Mage_Test. Adding tests into your own modules is completely safe - doing so will not break any Magento install where Mage_Test is not installed. An example and tutorial of how this can be achieved can be found in the Mage_Test_Demo repository