Or: Test Eye for the Framework Guy
Douglas Sellers, The Inkster Guy gave a talk on writing a domain-specific language for testing. His idea is to write the test cases first in a language that looks like a English, then figure out how to write an interpreter for those test cases.
(Stereotype warning / warning / you’ve been warned …)
In my mind, this is a huge part of the problem with test frameworks. Developers write test frameworks so that someone else (“those QA people”) can write test cases.
The problem is, writing the test case in XML or java is just no fun. Really, it is no fun. It’s so not fun that the devs don’t want to do it. In my mind, this is a problem with process design – when you design a process for somebody else to do, the resulting process isn’t very good, because you trade all the good and fun things away to get management-y things.
Here’s my conclusion: If you want to write a test framework, first write some test cases, and keep tweaking them until they are fun to write – or at least easy. Then write the framework.
Then implement a real, non-trival test project in your framework. Yourself. Yes, you. The developer. If you can build a test suite and actually use it, then open-source and talk about your tool.
Another neat person I met at GTAC was Will Roden, author of the Software Inquisition blog. At lunch on the second day of the conference, will demoed SiFL for me. SiFL is a “foundation library” that will wrote on top of Quick Test Pro, in order to make writing test cases in QTP quick, easy, and, well, fun.
Basically, it’s just a series of reusable functions that make driving a browser really really easy. The thing is, they are designed to be easy for the tester, and optimized for the tester. This is a real library that, when combined with QTP, looks just as useful to me (more useful) than some of the frameworks that we see projected on the big screen.
Why? Because it was developed of the tester, by the tester, for the tester. No XML test cases for you …
UPDATE:I found a great little quote that explains the whole framework-authors-vs-testers issue:
Strathman’s Law of Program Management: Nothing is so easy as the job you imagine someone else doing.
Thanks for the link, but I have to ask one favor. Can you spell my last name without the “h”? Something like “Roden” would be nice.
This is Caroline from SocialRank.
I am trying to get in touch with you but couldn’t find your email address.
We will index your blog posts as part of our content filter. I’d like to send you an invite to a beta preview of our new Web 2.0 site.
Can you get back to me with your email address.
Mine is firstname.lastname@example.org