After solving a problem, now its time to test your data whether it is correct or not and for testing, we need “Test Data”. For example: if we want to test the algorithm to find the largest among three given numbers n0,n1,n2 then we need three values. These values can be positive, negative or zero.

For example:

(n0=5 , n1=6, n3=3) , (n0=27, n1=-6,n2=35) , (n0=6,n1=-23,n2=11)

So, for thinking about testing, we also need to think about test data.

The importance of testing:

When we are discussing about testing of data the question arises in your mind that:

Why do we need to do testing of our software?

Testing is important to point out the defects and errors made during finding a solution to some problem. It helps us improving a solution.

If one solves a problem and someone else uses that solution for commercial purposes, then the commercial activities depend upon the correctness of that solution.

For example:

If we develop a solution for finance management and some bank starts using it then any error in that solution may result in a financial loss. So, testing is important for a solution.

Example #2:

A car is delivered to a customer after testing. Upon launching a new car, it is usually tested with a robot driver who hits the car with a wall. It is used to test whether the airbags and other security systems are functioning or not. Moreover, it also allows the car designer to suggest further security measures to reduce the damage. This test can help to make a car safe. So, testing helps to improve quality.

Types of Test Data:

Creation of proper and sufficient test data is one of the key activities to improve the quality of a solution. Each type of solution requires different data.

Types of Test Data include:

Valid test data:

It is the type of test data that consists of input requirements of the algorithm. If an algorithm is supposed to take a numeric value between 1 and 100 as input, then any value between 1 and 100 is only considered valid. If any value such as 101 is entered, it is considered invalid and error is generated.

Invalid test data:

It is the type of test data that doesn’t consists of input requirements of the algorithm. It is necessary to make sure that the solution correctly works for invalid values for example showing an error message to the user that the provided input values are improper.

Boundary test data values:

A solution is tested on extreme values. For example to calculate interest we can consider principal amount as 0 or a very huge amount. We can consider it a range of maximum or minimum values that are accepted by the system.

Wrong data formats:

It is important to check how the system reacts on entering data in an appropriate format. For example, giving an alphabet as input when a numeric value is expected.

Absent data:

It is also important to investigate that the solution still works if less number of inputs are given than expected. For example, if a system ask to enter driving license number, then every one cannnot provide this information. It is important to see how system react in this situation.

Conclusion:

Testing of data is very important for any software to work properly. Without testing, your software is at risk to crash at any time. We can perform testing for different purposes as mentioned above. With the help of test data, you can successfully execute your software.

Any question related to this topic?