I’m still thinking about test case design, and I am liking the idea of test patterns more and more. Most of the functional techniques we commonly think of (like equivalence class partitioning / BVA or combinatorial analysis) can be thought of as test patterns. In fact, Binders Category-Partition example is essentially equivalence class partititioning.

 

What testers need is a library or toolbox of patterns they can choose from to apply to any testing situation. Brian Marick has done some extensive research on Patterns of Software Test, but nothing in the last five years. Given my current thoughts, I guess I should follow up with him and see if he still sees value in test patterns, or whether he hit a dead-end that I haven’t seen yet.

 

Test patterns have the same benefit to test design as design patterns have for code design. I need to review Binder’s patterns (Binder’s tome includes 37 test design patterns, 17 test automation patterns, and 16 micro-patterns for test oracles), but I think there are easily dozens more. I can think of half a dozen security testing patterns off the top of my head. I also think that I can come up with more patterns focused on structural testing…sounds like I have even more to think about! I'll try to flesh out some of my ideas in a future post.