Positive and Negative Testing In Software Testing

Updated on Sat 10 Sep, 2022 | 5 mins read | Free training, Manual testing, qa training


Software testing is a process of verification and validation to assess whether the software application under test works as expected. To verify the application, we need to provide input and then check if the results are as expected according to the requirements. This testing activity is conducted to find defects in the code and improve the quality of the software application. There are two types of testing, positive testing and negative testing.

Positive Testing

Positive testing is a testing process where the system is validated against valid input data. In this type of testing, the tester always checks for valid sets of values and checks if the application behaves as expected with expected inputs.

The main purpose of this testing is to ensure that the software behaves as expected when it is supposed to and displays an error when it is not supposed to. Such testing is to be carried out with a positive outlook and only execute the positive scenario. Positive testing attempts to prove that a given product or project meets requirements and specifications. Positive testing focuses on testing normal day-to-day life scenarios and ensuring expected behavior from the application.

Example of Positive testing

Consider a scenario where you want to test an application payment module that contains a simple card text box to enter a credit card number, and the requirement for that input box is it should take only integer values. Here, we are providing only positive integer values to check whether it is working as expected or not. This is known as positive testing. Most of the application developers are focused on implementing positive scenarios, where the testers receive a low defect count from positive testing.

Also read Test case/ Test scenario for registration process

Negative Testing

Negative testing is a type of testing that validates the system against invalid input data. A negative test evaluates if an application responds correctly to negative inputs. The main goal of this testing is to ensure that the software application does not show errors when they are expected to and does show errors when they are expected to. Such testing is to be carried out with a negative perspective and only execute test cases for invalid input data.

Negative testing is a testing process to identify the inputs where the system is not designed or handles unexpected inputs by providing different invalid inputs. The main purpose of negative testing is to verify the stability of the software application against the effects of different types of erroneous validation data.

Example of Negative Testing

Consider a text box for the credit card number that should only accept integer values. So, here you should provide the characters like “abcd” in the age text box and then check how the application behaves. Either it should show a validation error message for all invalid inputs, or the system should not allow you to enter a non-integer value.

The purpose of negative testing is to improve the testing coverage of your software application under test. Both positive and negative testing approaches are crucial for improving the reliability and stability of your application.

Let’s take another example of Positive and negative testing scenarios:

If the requirement is that the password text field should accept between 6 and 20 characters, with only alphanumeric characters.

Also read Importance of Manual testing

Positive Test Scenarios

  • The password text box should allow for 6 characters.
  • The password text box should allow up to 20 characters.
  • The password text box should accept any value between 6 and 20 characters in length.
  • The password text box should accept all numeric and alphabetical values.

Negative Test scenarios

  • The password text box should not allow passwords less than 6 characters in length.
  • The password text box should not contain more than 20 characters.
  • The password text box should not allow special characters.

Instructor-led Training

Software Testing Online Training

Online Software testing training includes the following modules:
  1. Manual Testing
  2. Database/SQL/Database Testing
  3. JIRA defect management tool
  4. Java Programming
  5. Selenium Framework
  6. TestNG
  7. Cucumber with Maven
  8. Basic of Jenkins

To get more details, please visit the following URL:

https://www.qaonlinetraining.com/courses/software-testing-courses/qa-online-training/

Software Testing Classroom Training

Software testing classroom training includes the following modules:

  1. Manual Testing
  2. Database/SQL/Database Testing
  3. JIRA defect management tool
  4. Java Programming
  5. Selenium Framework
  6. TestNG
  7. Cucumber with Maven
  8. Basic of Jenkins
  9. API Testing with SoapUI or Postman
  10. Performance Testing with Jmeter

To get more details, please visit the following URL:

Master of Software Testing + BA + ISTQB Training

Note: In classroom training, Business Analyst Training is totally free.  And ISTQB Certification training is totally up to you.

Conclusion

Whenever we test a module, we should approach both positive and negative testing. Both positive and negative testing approaches are crucial for improving the reliability and stability of your application.