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 example?
Use an invalid URL for a button link What if there is a typo in the URL? This is a clear example of a negative test case. To test, you would enter an invalid URL in the CMS for that button then save it.
A positive test is a test that verifies a correct functionality, a negative test verifies that a function will fail or throw an exception.
A positive test case tests that a system does what it is supposed to. Example: will allow you to login when valid credentials are supplied.
A negative test case tests that a system does not do things it shouldn't. Example: should not allow you to login when invalid credentials are supplied.
Positive case is a case where the system validated against the valid input data
For example, consider a scenario where you want to test a application which contains a search field and requirements say that you should not enter special characters.
ID: 1
Name/Idea: Verifying that search field works with valid input
Precondition steps: "Search" screen should be opened
Steps to reproduce:
Fill search field with valid information
Tap on "Search" button
Expected result: The screen with results of search should be displayed
Positive/Negative: 1
Negative case is case where the system validated against the invalid input data. A negative test checks if a application behaves as expected with its negative inputs
For example, consider the same example which should accept only letters. So here provide the characters like “@,#,/” in the search field and check the behavior of application, either it should show a validation error message for all invalid inputs or system should not allow to enter special characters.
ID: 1
Name/Idea: Verifying that search field works with invalid input
Precondition steps: "Search" screen should be opened
Steps to reproduce:
Fill search field with invalid information (e.g. @,#,/)
Tap on "Search" button
Expected result: Pop-up with error message should appear
Positive/Negative: 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With