Positive test cases and negative test cases

后端 未结 6 1091
无人共我
无人共我 2020-12-25 07:49

what are positive test cases and negative test cases?

Upon googling about it i have found answers that are very confusing. Can anyone explain with

6条回答
  •  被撕碎了的回忆
    2020-12-25 08:43

    I dont know but I was somewhat dissatisfied with above answers. So here are my views upon this topic:

    1. Positive testing is the testing for something that should happen, does happen.
    2. Negative testing is the testing for something that should not happen, does not happen.

    Lets have a scenario where we have two requirements: Requirements:

    1. A text box to enter some characters.
    2. A button to submit entered text to the server.
    3. A message to be displayed when number of characters is less than 5. "Less than 5 characters".
    4. A message to be displayed when server accepts text submitted. "Text accepted".

    Now, a positive scenario would be:

    1. Enter "abcdef" in the text box.
    2. Click on submit button.
    3. "Text Accepted" must be displayed.

    On the other hand, a negative scenario would be:

    1. Enter "abcd" in the text box.
    2. Click on submit button.
    3. "Text Accepted" must not be displayed.

提交回复
热议问题