This is the 2nd new thing I learnt at SEETest 2008, which made it into an excellent conference. I’m sure that quite a few of you already know this technique, but as I wrote in my post about attending International conferences, I got left behind …
The subject was “Creating Real-World Test Cases using Extension to Noun and Verb Usage”. Vipul adds an extension to the Noun and Verb usage technique which was first coined by Elizabeth Hendrickson. Vipul gave a talk on this subject at CONQUEST 2007, and since he had a bit of time left at the end of his Q-Patterns tutorial, he used it to explain this technique.
The goals of this technique are to:
- Write effective test cases
- Reduce the impact of bad and missing requirements
- Raise important questions about software behavior
- Bring more uniformity into the coverage even when different testers write test cases
In Object Oriented design, nouns are classes, and verbs are methods
- nouns are test objects,
- verbs maniputlate the test objects, i.e. they are the tests you want to apply,
- and adverbs and adjectives affect the test objects, i.e. add more test cases.
Great. Now what do I do with this? I combine the nouns, verbs and adverbs/adjectives into test cases.
Stage 1: Extract the nouns, verbs, adverbs and adjectives.
Stage 2: Combine the nouns, verbs, adverbs and adjectives. Like this example of what an ATM system should do:
There are lots of test cases that you can write if you continue combining the nouns, verbs, adverbs and adjectives
So why do we need Vipul’s extension?
Very often, the requirements aren’t detailed enough, for example: “the given application allows users to open supported files”.
I’m sure that none of you have ever seen a requirement that looks like this!!
What is the extension ?
- Extract the nouns and verbs
- Use “5W1H” (who, what, why, where, when, how, how many, how far …) to extract adjectives, adverbs
- Use pre and post conditions to extract more nouns and verbs
- Enumerate properties of every noun
- Break down these properties to base elements
- Use boundary values, equivalence classes on the base elements
- Write tests for individual properties
- Combine operations (verbs) to write scenario based tests
I was going to continue with completing the example, but that would have made this post SOOO LOONNG.
So, for full details of the technique and a complete example, go to Vipul’s CONQUEST presentation.
Just one word of warning about this technique: It can be used to easily develop 1000’s of Test Cases, but that is not the idea. The idea is to use the technique to develop 1000’s of IDEAS, then to prioritize them, and then to decide which ideas to develop test cases for.
If you enjoyed this post, please consider subscribing to my RSS Feed, to keep up with all future updates.