Monday, July 06, 2009

 

Testability

On Twitter, Kindly Reader@jrl7 (in real life, John Lambert at Microsoft) asks "Is there an example of testability that doesn't involve improving ability to automate? (improved specs?)".

Yup. If testing is questioning a product in order to evaluate it, then testability is anything that makes it easier to question or evaluate that product. So testability is anything that makes the program faster or easier to test on some level. Anything that slows down testing or makes it harder reduces testability, which gives bugs an opportunity to hide for longer, or to conceal themselves better.

Testability is enabled, extended, enhanced, accelerated or intensified by initiating or improving on some of the things below, either on their own or in combination with others. That suggests that testability ideas are media, in the McLuhan sense. Thus each idea comes with a cautionary note: As McLuhan pointed out, when a medium is stretched beyond its capacities, it reverses into the opposite of the intended effect. So the following ideas are heuristic, which means that any of these things could help, but might fail to help or make things worse if considered or applied automatically or unwisely.

In accordance with Joel Spolsky's Law of Leaky Abstractions, I've classified them into a few leaky categories.

Product ElementsUsability

Things that make a program faster or easier to use tend to make it faster or easier to test, especially when testing at the user interface level. Any time you see a usability problem in an application, you may be seeing a testability problem too.
Oracles

An oracle is a principle or mechanism by which we might recognize a problem. Information about how the system is intended to work is a source of oracles.
Equipment and Tools
Build, Setup, and ConfigurationProject and Process
Want more ideas? Have a look at James Bach's Heuristics of Testability. But in general, ask yourself, "What's slowing me down in my ability to test this product, and how might I solve that problem?"

Postscript: Bret Pettichord contacted me with a link to this paper, at the end of which he surveys several different definitions of testability.

Comments:
I agree with everything you've posted, but I'd like to make up a word and add it to the list: debugability. Not just monitoring over a debug port, but things to help interactively debug running code. Some of these things apply to compiled binaries much more than scripts or web interfaces.
- non-obfuscated code to test
- non-optimized, debug binaries instead of release ones (where applicable)
- whatever needed debug symbols (if any) are readily available
- debugging tools to help diagnose typical problems - I mean actually within a debugger when available
- etc.
 
"Is there an example of testability that doesn't involve improving ability to automate?"

I think your response is dead on.

For fun, I did some research on McLuhan where his illustration of marketing is appropriate to test automation.

A nose for news and a stomach for whiskey: McLuhan analyzes an ad for Time Magazine in which he likens a reporter depicted as a romantic character from a Hemingway novel and asks "Why is it [his] plangent duty to achieve cirrhosis of the liver?"

Just as satirically, in the testing sense, why is it Automation Vendors dismal duty to achieve widespread disruption of sentient testing?
 
In the third point of Product Elements there is debugging mentioned:
- Real-time monitoring of the internals of the application via another window, a debug port, or output over the network—anything like that. Printers used to provide "real-time" updates.

This point basically reminded myself on my reply to Brian Marick's "An Alternative To Business Facing TDD" last year:
http://www.exampler.com/blog/2008/03/23/an-alternative-to-business-facing-tdd/
 
thanx for telling everything in detail. but my question is the same as Markus Gärtner.
 
@offshore...

You're welcome, but I don't see Markus' question. I'd be happy to answer it.

If you're referring to Joseph Ours' question ("Why is it Automation Vendors dismal duty to achieve widespread disruption of sentient testing?"), my answer is that it's not intentional; they know not what they do. Specifically, they're confusing testing and checking.

---Michael B.
 
I am not sure as to wether I can accept your definition of testability. "Tesability" to me is the feasibilty of proving the validity (or otherwise) of something. This means lack of ambiguity is a requirement for testability, as is some way of measuring or quantifying a result. For example, requirements should be Specific
Measurable,Attainable, Realistic and Timely in which case they are testable. Being easy to test does not come into it.
 

Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?