Wednesday, March 24, 2010

Software Testing - Introduction

Software Testing

# "Testing is the process of executing a program with the sole motive of finding errors in it."

# "Testing can show the presence of bugs but never their absence."

Why a Software Needs to be Tested??

Every software product needs to be tested since, the development 'process' is unable to produce defect free software. Even if the development process is able to produce a defect free software, we will not be able to know unless & until we test it. Without testing it, we shall not be having enough confidence that it will work.

Testing not only identifies and reports defect but also measures the quality of the product, which helps to decide whether to release the product, or not.

How much Testing is enough?

# It depends on RISK
risk of missing important faults
risk of incurring failure costs
risk of releasing untested or under-tested software
risk of losing credibility and market share
risk of missing a market window
risk of over-testing, ineffective testing

# When you are confident that the system works correctly

Testing Principle -> Priorities tests so that, whenever you stop testing,you have done the best testing in the time available.

What is a Bug?

Error: A human action that produces an incorrect result
Fault: A manifestation of an error in software also known as a defect or bug if executed, a fault may cause a failure
Failure: deviation of the software from its expected delivery or service (found defect)
Failure is an event; fault is a state of the software, caused by an error

Who should test? and what? – An Overview

Who should do the testing?
Software testing is not the job of one person. It is teamwork. The size of the team depends upon the complexity and size of the software being tested. The software developer should have minimum or no role in the testing process as everyone knows that for a person who has developed the software, it is very difficult to pin point errors in his own creations.

Seven soft skills crucial for a good tester are – that He or She must:

1) Be Cautious
2) Be Curious
3) Have Patience
4) Have Perseverance
5) Be Analytical
6) Be Critical but with an attitude of not jumping to conclusions.
7) Be Good Communicator

logically try to see as to why it is being said that complete testing is not possible:
For example, Myer considered a while loop and few IF statements structure which has say (10)14 or 100 trillions paths as per above figure. It is because there are 5 paths through the loop body which are executed 20 times. Hence we get

(5)20 + (5)19 + (5)18 + ... + (5)1 = (10)14 or 100 trillions

If 1 path takes 5 minutes to test then

(10)14 paths will take = 5 x (10)14 minutes
= 1 billion years

This means we shall not be able to achieve our ideal objective of complete testing.

Hence we need to try to find out the critical areas where probability of finding a fault is maximum. However this too is not an easy task for an organization.

Since we need to test for every possible combination of valid and invalid inputs, the total number of combination's are 28 x 28 if a program requires two 8 bit integers as input. What if inputs are more than two and size is also more than 8 bits. Hence, complete testing is just not possible.

To overcome such difficulties, the organizations must try to develop strategies and policies for choosing effective testing techniques rather than leaving this as arbitrary judgements by the development team.

More articles on Testing will be posted soon.
Next Page »

Search This Blog