Presentation is loading. Please wait.

Presentation is loading. Please wait.

Positive and negative testing

Similar presentations


Presentation on theme: "Positive and negative testing"— Presentation transcript:

1 Positive and negative testing
Positive testing tries to prove that a given product does what it is supposed to do. When a test case verifies the requirements of the product with set of expected o/p, it is called Positive TC. Example Lock and Key

2 “POSITIVE TESTING IS DONE TO VERIFY THE KNOWN TEST CONDITIONS”

3 Req No INPUT 1 INPUT 2 CURRENT STATE EXPECTED OUTPUT BR01 KEY09 Turn CW Unlocked Locked BR02 NC BR03 Turn ACW BR04 Unlock BR05 Hairpin No Change

4 Consider the first row- Current state of lock is unlock and use key and turn it clockwise, the expected output is locked. During execution the test results is locking, then the TC is passed. This is an example for “Positive test condition” for positive testing.

5 Consider the last row Current state of lock is locked . Using a hairpin and turn it CW should not cause a change in state or cause damage to the lock. After execution, there is no changes, then positive test case is passed. This is example of a “negative test condition” for positive testing.

6 Negative Testing Negative Testing is done to show that the product does not fail when an unexpected input is given. Negative testing covers scenarios for which the product is not designed and coded. Test conditions termed as Unknown condition. A negative test would be a product not delivering an error when it should or delivering an error when it should not.

7 Negative Test Cases INPUT 1 INPUT 2 CURRENT STATE EXPECTED OUTPUT
Some other lock’s key Turn CW Lock Turn ACW Unlock Thin piece of wire Hit with a stone

8 In the above table, there are no requirement numbers.
Since negative testing focuses on test conditions that lie outside the specification. Here all the test conditions are outside the specification, they cannot be categorized as positive and negative test conditions.

9 Difference- PT & NT Differ by their coverage
For PT if all documented requirements and test conditions are covered, then coverage is 100%. If specifications are very clear- coverage can be achieved. Negative Testing 100 percentage coverage is not possible. Negative testing requires high degree of creativity. NEGATIVE TESTING IS DONE TO BREAK THE PRODUCT WITH UNKNOWNS

10

11

12


Download ppt "Positive and negative testing"

Similar presentations


Ads by Google