Test Oracle Generators. How do you know a bug is a bug?
I stumbled upon Cem Kaner’s notes Examples of Test Oracles
An oracle is a mechanism for determining whether the program has passed or failed a testA complete oracle would have three capabilities and would carry them out perfectly:
- A generator, to provide predicted or expected results for each test.
- A comparator, to compare predicted and obtained results.
- An evaluator, to determine whether the comparison results are sufficiently close to be a pass.
The ‘generator’ seems to be the source of distinguishing ‘expectations’ and any deltas as defects. One time a manager on a project told us - ‘anything that makes us look bad is a bug’. I guess he was a ‘generator’ in that moment.
Whenever I analyze UseCases or requirements and everything looks ‘ok’ and mainly ‘right’ I usually add a section to my analysis called ‘Risks’ where I list all possible ‘issue’ that may come up as defects to anticipate future user’s interactions with a particular feature. Then in the future when I get a bug report from the ‘customers’ I can compare my Risks section to see if I have ‘predicted’ it for myself. I try to build a ’smell’ generator from those notes.
Post a Comment
You must be logged in to post a comment.