The software testing can also be classified as two types of testing one is positive testing and negative testing. Positive testing is the application functions as expected valid data sets. If an error occurs during positive testing the test fails. In the Negative Testing, the application handles the unexpected behaviour or invalid input. For example if a user tries to type a wrong data in the field it would display a correct message for incorrect data. The quality of the application improves due to the negative testing.
Negative testing is detecting the possible software crashes in different situations, such as
- Populating required fields
- Correspondence between data and field types
- Allowed number of characters
- Allowed data bounds and limits
- Reasonable data
For example the functioning of a lift in real life. When the people enter and press the floor button automatically the lift is made to move to the required floor. If the number of people exceed in the lift, if a power failure happens during the lift functions – all these cases are included in negative testing. Negative testing is important in the organisation’s perspective because it is the responsibility of every organisation to build a good quality product to the customer. To achieve this we conduct the negative testing
Negative testing characteristics are:
- It is carried to point out the faults which can lead to major failures
- It is performed to find the software weakness and its potential for exploitation
- It is conducted to identify how the security breaches can occur.
Negative testing techniques are
- Skipping the data and proceeding
- Verifying each field type
- Verifying numeric data size and boundary tests.
The equivalence partition between negative testing and positive testing is
The different types of negative testing situations are:
- Filling the values in required fields: The applications behaviour is checked when the test leaves the required fields empty and analyse the response of the application.
- Data and field types correspondences: The forms that contain controls can be tested by entering the invalid values to know the proper function of the application.
- The number of characters which are allowed: Some fields allow limited characters to be entered. For example: the user name or password field has a specific number of characters
- Allowing data bounds and limits: Applications can accept the input value in a certain range of data. For example of negative test: Enter the data in an application that exceeds the data type limit.
- Reasonable data values: some applications have reasonable data limit. For example: Enter data limit in the age field in any application.
- Web – based testing: some websites have condition to log in or use captcha before opening the first webpage to check whether the application behaves properly.
In positive testing it always proves that the product always meets the requirement specifications.In negative testing the main intention is to test whether the software is not showing the error when it is supposed to show or showing error when it shouldn’t show. Negative testing is a procedure to identify the inputs where system is not designed. The reason behind the negative testing is to check the stability of any software under the influences of various types of incorrect data set.
Check your understanding:
- What is Negative Testing?
- Mention the difference between Positive and negative testing?
- What are the advantages of Negative testing?
- Explain the characteristics of Negative testing?