Negative Vs. Positive Testing

February 7, 2019
John Kensinger
John Kensinger

While there are many types of software testing, two basic and paramount categories are Positive and Negative Testing.

Positive Testing

Positive Testing is a type of testing whereby a valid data set is entered as the input. In this case, it confirms whether or not software is working as expected by using positive inputs. In short, this form of testing seeks to confirm that the software does exactly what it’s supposed to do.

For example, let’s say you have a text box that will turn green when you enter numbers. If you enter three numbers, the box should turn green. If it does, then that would be an accepted positive test. If it doesn’t, then it has failed the positive test; in other words, it doesn’t work as expected or as it should.

Negative Testing

On the other hand, Negative Testing is a type of testing whereby an invalid data set is entered as the input. In this case, it confirms that the software is not working as expected by using negative, or incorrect, inputs. This form of testing confirms that the software does not do anything it should not do with the incorrect input.

Using the same text box example from above, say you enter three letters instead of numbers. The box should not turn green. If it does turn green, that would be a failed negative test; in other words, if numbers are not entered, it should not turn green.

Two Parameters

Both types of testing are most commonly applied in test cases and typically entail two parameters, boundary value analysis and equivalence partitioning.

Boundary Value Analysis

Boundary value analysis is a technique whereby tests are designed with preset boundary values in a range. This prevents input values from being placed at extreme ends of the input domain (the farther apart they appear, the greater the chance of system error). Thus, the focus of boundary value analysis is to find the errors existing at the boundaries as opposed to the center.

Equivalence Partitioning

Equivalence partitioning entails separating input data into partitions of equivalent data from which test cases can be selected. This parameter seeks to define types of errors (trends) found in test cases in order to reduce the total amount of cases that must be written out.

When to use each one?

Many critics argue that negative testing is too similar to positive testing to provide any sort of novel insight. However, while similar, they are certainly not identical, and using both forms of testing in tandem can allow for the most comprehensive testing measure. While positive testing affirms that the given use case is valid, or correct, negative testing can prove that the software is devoid of issues that may deter a customer from successfully utilizing it.

Read More

April 1, 2020
How test IO helps amplify distributed teams

With remote work capability now a necessity, companies must have the tools in place to enable distributed teams to perform at the highest level. test IO is one of those tools.

March 12, 2020
Tester Spotlight - Alex Che

We’re able to do what we do because of our incredible and diverse community of testers. Meet Alex, a Policeman now QA Engineer who gained the real-world QA experience he needed to change careers testing with test IO.

March 10, 2020
A Benefit of Crowdtesting - Time Compression

When budgeting for crowdtesting in the coming years, it's important to know all the value it adds. Here a little more on one of those values, time compression.

Ship Faster, Sleep Better

Get a Demo
twitterfacebooklinkedin