The main objective of conducting a series of tests on a software product is to make it foolproof so that it will run on any type of system and under any computing environment. Quality conformance testing is an essential part of the software developmental process. Various tests are performed along different development stages and also on the finished product before it is delivered to the client or end user.
These tests for verifying and validating the product are often referred to as positive tests. However, as stated, positive testing can only confirm that the software works as it should in the specified situation, but not all situations can be covered. In this regard, a negative testing procedure will come to help software testers.
To further ensure customer satisfaction, there are tests performed to show that the software does not work as expected, known as Negative Testing. Sometimes, only one failed test is enough to conclude that the software does not function as expected. Negative testing is also called dirty testing. Some of the most common explanations for negative testing are as follows:
- Negative Test plans to stress the system beyond the limits for what is has been built for; to use it in an incorrect manner; to stress the system beyond normal use cases; cause denial of service
- A negative testing plan at showing that software does not work. Experts also call this testing as “test to fail” or “dirty testing.”
- Negative testing the software is testing, if it is doing something it is not supposed to do, like accepting an all-word password, when the requirement is for the password to have at least one number.
Negative tests are written and composed to affirm and verify that the software on hand will deal in an appropriate manner with the situations for which it is not programmed. In simple words, a negative test case will have its scripts written on the contrary to what is given in the functional aspects in order to break the functionality.
The main goal here is to check if the given software application is stable and it is doing what it is planned for. Sometimes, only one failed test is enough to conclude that the software does not function, as it should. People also call negative testing as dirty testing.
While majority of the quality testing conducted, show that the program works within the acceptable level agreed upon, negative testing does exactly the opposite. In reality, tests are designed to make the system to fail. With this approach, the weaknesses, errors and other potential problems are exposed almost immediately. Missing to detect potential, significant failures would lead to customer’s dissatisfaction and will ruin the company’s reputation.
Negative testing may also be defined as testing software applications outside their operating limits, that is, above the upper specification limit and below the lower specification limit. The tester attempts to verify if the software would do something it was not designed to do. This is done by:
- Introducing deliberate false inputs like entering an upper case instead of lower case character or entering an all-letter, instead of the required minimum one number for the password field
- Testing the software with boundary values (minimum and maximum) or erroneous data inputs like requesting to withdraw $10 when the available amount is only $5
It is important to understand the purpose of negative testing. Negative testing is not the duplication or a slight variation of the scripted tests and involves additional expense and time involved? Is it really a must in software development? Actually, valuable information about the software’s functionality and reliability are discovered during negative testing. Negative testing aims for:
- Diagnosis of the possible causes of failures like crashes, security breaches and corruption of data
- Assessment of the response time to external problems; response time for a particular request
- Identification of the software weaknesses and potential for exploitation; concerns with the security features of the application. Skilled tester will be able to find out the potential danger zone very easily.
- Verification of functionality issues like error-handling and recovery
- Input validation and rejection
- Out-of-range data,
- Dates in incorrect format, dd/mm/yyyy instead of the required mm/dd/yyyy
Negative testing is applicable in the different stages of software development as highlighted below:
Requirements Analysis – Requirement analysis could be a great way to validate functionality early and expose conditions that were not considered during the design stage of the development. Sometimes, some clients may require certain functions, but which are difficult to correlate with the overall design. Early detection of this design incompatibility would save both the client and the developer precious time and money.
System Testing – Negative test uses the applicable scripted tests, but using those values that would actually lead to failure.
Extended Use – Negative testing may expose cases of numerous errors during extended use. However, some weaknesses and failure may not be detected during the early stages of software development. Extended use may allow testing to determine the performance limits of the system.
Negative testing is one of the most practical ways to make systems handle errors and failures in an appropriate manner. Testers can conduct this operation along with all types of positive testing to ensure that the software is capable of handling inconsistent information and errors.
Negative testing will guarantee that your software applications can easily handle invalid inputs or unforeseen user behavior. The main goal of negative testing is to find out unforeseen situations and prevent them possible crashing. Negative testing also helps you enhance the quality of application and detect its weak points. This test is open ended and occasionally exploratory in nature. Initial planning and documents are very necessary while conducting the test. Here are some negative testing activities that are essential to conduct a faultless procedure:
Design and Execution
Negative test involves introducing erroneous inputs to cause the system to fail. Therefore, you must have a small checklist of your inputs selection that can enhance the speed of testing and later avoid missing useful data. The results accrued by the initial tests would detect the next steps.
Performing Exploratory Tests
An exploratory test acts as a follow-up test that will help you detect the open issues found out in the initial negative testing. Due to the unforeseen and unpredictable situation, an exploratory testing could the most feasible way to go forward.
Test results can assess risks and weaknesses on the system
This step will ensure that next steps that you take will be the most appropriate ones. Additional tools and personnel maybe assigned to catch up with any extra work, if necessary.
Verification and follow up tests for problems encountered
This step will help you evaluate the direction where you want your tests to go.
Communication or feedback on test results
Testing activities will provide you practical feedback on the results obtained. These feedback results would form a solid basis for all future corrective actions. All corrective actions will lead to product enhancements and improvements.
Negative testing is open ended, so the tester may be tempted to go on even if only minor test failures are encountered. Negative testing could be exploratory in nature. So, when does a tester stop negative testing?
When you do not find any significant issues, you can stop conducting negative testing. Good and recommended point of reference is the usage of scripted tests as specified in the test plan.
For projects with stiff deadlines, you may need to present the results for verifications and assessments for the risks. You may also take a decision to prioritize the project or allow an extension to proceed. Both the developer and the clients or end users, affirm and agree that that no further tests are necessary. Negative testing may be a duplicate of the various positive tests conducted during and after the development processes.
Users who have a real knowledge and skills of the standard quality and reliability tests will most likely not agree, because negative testing is a powerful and effective approach to discover significant failures, which maybe undetected under normal operations or functions.
Negative testing is viewed by some as a duplicate of the various positive tests conducted during and after the development processes. Those who has a real understanding of the standard quality and reliability tests that go with software development will most likely not agree because negative is a powerful and effective approach to discover significant failures which maybe undetected under normal operations or functions.
Negative testing is aimed at discovering those ‘hidden’ errors and needs skilled, experienced testers with an eye for details that leads to the detection of what seems insignificant signals of possible concerns. Without the skill, proactive attitude and intelligence of the tester, negative testing would not be as powerful as expected in detecting system flaws. As with the other quality tests, error or failure detection is just one part of its usefulness in the organization. The other important benefit is the test result which will serve as basis for continual product improvement. Management support is necessary, if negative testing should form a part of the various testing activities used during software development.