This is a big task, but there are members of the Magento community who have taken it.
The EcomDev_PHPUnit module provides the basis for Magento unit testing, but it does not contain any real tests. It could (and was) be used to test basic functionality or modules that you yourself developed.
One of the key benefits of the EcomDev module is that it provides 100% database isolation. It creates an exact copy of the structure of your database, and then uses devices (see page 6 of the manual ) to insert data into these tables to create test prerequisites. This is a powerful and best practice, but requires quite a bit of customization.
You can try using phpMyAdmin to export data to YAML in readiness to create fixtures.
An alternative is to create and automate a comprehensive Selenium test suite for the browser user interface. In fact, the best solution is to prepare tests for the unit and UI, as there will be areas that can only be tested in one functional domain. There is a lot of business logic built into Magento Javascript (e.g. all validation.js) that PHPUnit cannot easily test, Selenium is your best option here.
early talk of creating a unit test repository to cover core features, however keep in mind that Magento 2.0 (planned for 2012) advertises full testing coverage .
Jonathan day
source share