Functional Testing: Introduction
Is it even possible?
If your application isn't tested it doesn't work...
If you write applications without tests then you are a bad person, incapable of love.
—Wilson Bilkovich (The Rails Way)
Functional testing is no silver bullet though:
"Automated tests ensure the software is working as designed. Human tests ensure the design is working."
You will still want to do usability testing. In eXtreme Programming you would have feature requirements from a customer representative who is involved in the design.
My name is Michael Foord. Since May 2006 I have been working for Resolver Systems creating a spreadsheet development environment with IronPython and Windows Forms. We do all our development with TDD, including functional testing, this article is based on my experiences.
- Functional tests
- Acceptance tests
- Integration tests
- Black box testing
These are all different terms for functional testing (although different organisations ascribe different shades of meaning to different terms).
Whilst unit tests check that components of your application behave as specified, functional testing tests that it actually works as a whole. They drive the application 'from the outside'- interacting with it in the same way as the user. You automate this, making assertions that the expected behaviour results.
In some ways its more important than unit testing - but it's also harder.
There is lots of discussion and resources for testing web applications, not so much for writing desktop applications. I guess writing desktop applications is unfashionable these days. I tend to find a well written desktop application orders of magnitude more usable than a well written web application.
Is it Possible to Test GUI Apps?
Is it even possible?
Joel Spolsky famously declared that automated testing of desktop applications wasn't possible (it was a while ago though).
This attitude is unfortunately still not uncommon. To prove that it is possible (before I show you how), you can watch a short (2 minute) video of some of the automated Resolver One tests...
The next page explains more of the specific advantages of functional testing and looks at the infrastructure and processes needed to get the best out of them.
For buying techie books, science fiction, computer hardware or the latest gadgets: visit The Voidspace Amazon Store.
Last edited Tue Aug 2 00:51:33 2011.