The implementation of automated tests has always been an interesting topic for many store owners and managers. We receive many questions every day like: should we invest money for tests in addition to development? How will it help an online business? Which tests are better and why? Therefore, we aim to shed some light on the most popular and useful types of tests and highlight the key reasons for their importance.
The Magento Functional Testing Framework was presented by Tom Erskine during the contribution day following MageTestFest, held in Amerfoort in November of the previous year. Currently under heavy development, it has already seen 2 releases and has reached version 2.0.3.
Every unit test ninja faces troubles whenever he wants to test some real class functionality. Have you ever invoked toHtml() method of some block or beforeLoad() method of any collection? If you want to do it, you will need to mock a lot of classes that depend on other classes and so on. You would need to mock all of them, which would take a lot of time and effort. In a long run, you may blow up deadlines and it would really suck. Yes, you can try to change your testing strategy to avoid invoking such methods. But what if you still need to test them? Let’s explore how I addressed this issue.