Testing My Opera
By Esteban Manchado Velázquezzoso. Friday, September 19, 2008 1:16:40 PM
The automated testing for My Opera is based on three things:
- A functional test suite.
- A unit test suite.
- Our beloved continuous integration server, that executes the test suite at every commit and shows the results to the whole team.
The functional test suite is built with Test::WWW::Mechanize and uses special My Opera testing installations, each one connected to its own private database. That way, we can recreate the database before each test and ensure a stable and reliable environment for the test execution. This is currently the biggest and most mature one, and it has helped a lot in avoiding regressions when refactoring code and fixing bugs.
The unit test suite is a standard Perl test suite that covers the most important modules of My Opera. Again, we use private databases for the tests that do need them, so we ensure a reliable testing environment.
Last, but not least, we have everything hooked up in continuous integration so we have testrun information for every commit. When any test suite catches errors, we are automatically notified, and we can track which changes produced which errors.
All in all, we are quite happy with the automated tests for My Opera, as they give us freedom to work with the code without fear of breaking things without noticing. There is, of course a lot of room for improvement, and we are always tweaking and enhancing it.