Feel free to argue with me, but for the return on invested time, money, & resources, Automated User Interface Testing (AUIT; http://en.wikipedia.org/wiki/GUI_software_testing) is a far more accurate measure of how software will perform in the field especially when developing a web application.
Unit Testing (UT) does great at ensuring all methods (individual software actions) have proper results now and as code evolves, but if your concern is for the end-user experience (and it should be), AUIT provides the best results for the programming man-hour outlay.
Here are 3 solid reasons to go with AUIT over UT:
1) Automated User: A clinical review of all the end-user interaction with the various functions, buttons, fields, URLs, etc should be tested after each production build. Users enter all kinds of random garbage into web forms. Plug in some of the crazy stuff from your support/ticket system.
2) Volume: Automated volume testing will show how the software and server combination will handle 100, 1000, 10000 hits/minute. This will ensure the experience is fluid and request-to-response rates are acceptable.
Side Note: Users won’t wait more than 10 seconds before freaking out and clicking again or leaving a page. Keep it under 6 seconds or at least give them a UI clue that processing is underway. This is a topic for a later post.
3) Legacy Code: Where code exists that wasn’t designed with testing in mind (be honest, there’s a lot out there), AUIT is the only real solution.
We use a combination of WatiN (http://watin.sourceforge.net/) after compilation for our automated testing. Then, manual testing occurs once a month before the release. Based on the specifications detailed our iChannel Projects entry, we validate that new features fit the intended business process/workflow which is something that can’t be automated.
Use automated testing judiciously. If copious resources are available, add Unit Testing, but put primary testing efforts as close to the end-user experience as possible through Automated User Interface Testing.
Mike Chu
Developer
www.conarc.com