+ 2
Negative test cases
A hammer can push a nail into a wall but cannot cut a tree, for that you need an axe ! This example certifies that negative test cases are as important as the positive ones ?🤔 Yes or no ?
3 Antworten
+ 6
So what is the negative test case here? A test to verify that a hammer can't cut a tree?
+ 5
Well I guess that would depend on the size of the tree and your willingness to pound a hammer at it, because I’m sure a hammer will knock a tree down if you’re patient or strong enough to keep at it. I think that best represents using the right tool for the job. (You wouldnt use a thousand lines of if statements to check each element in a large list when a loop can do it in 5 lines would you?)
You install a pad-lock to secure your belongings, but it turns out it never came with a code. Well your stuff is safe, but now you can’t access them either. (probably should’ve made sure it came with a code)
+ 2
So what is the negative test case here? A test to verify that a hammer can't cut a tree? 🤔🤔🤔 Yes !!