You are on page 1of 17

TESTI

NG

Presented By: kammaravinod

Testing:
One of the practical methods commonly used to detect
the presence of errors (failures) in a computer
program is to test it for a set of inputs.
The output
is correct?

I1, I2, I3,


, In,

Inputs

Our program

Expected results
=?
Obtained results

- No code inspection
- No model checking
- No debugging 2

- No code analysis
- No bug fixing

Software testing
Testing level
System testing:
Block Box testing
White Box testing
Interface testing

Software Testing:
Software testing is a process of verifying and validating that a
software application or program.
Verification
Validation
Defect
WHY DO SOFTWARE TESTING?

To find the bugs

A clever person solves a problem. A wise person avoids it.

The V-Model of Software Testing


Business Case and
Production Verification
Statement of Work

Business
Requirements

Functional Design

Technical Design and


Coding

Validation and
verification

Production Verification

User Acceptance
Testing

System and
Integration Testing

Unit Testing

Testing
Relationship

Work flow

Testing Level:
Unit testing

: Checking the behaviour of single modules

Integration testing : Checking the behaviour of module cooperation.


Acceptance testing : The software behaviour is compared with end user
requirements.

System testing

: The software behaviour is compared with the


requirements specifications.

Regression testing : To check the behaviour of new releases

How to select input values?


Random values
Tester Experience
Boundary values

input values (3):


Combinatorial testing:
Ex:method( a:int, B:int, c:int ) .. how many combinations?
3
with 10 values per input: 10 =1000
3
with 100 values per input: 100 =1000000

Black box testing:


Black box testing which was done by testers. it also called functional
testing is testing that ignores the internal mechanism of system or
component and focuses solely on the outputs generated in response to
selected inputs and execution conditions.
Each function or sub program used in main program is first identified.
EX:- payroll system call_ gross pay()
(a):Interface errors
(b):Incorrect or missing functions
(c):Errors in external database access
(d):performance errors
(e): Initialization and termination errors

White Box testing:


White Box testing is also known as glass-box testing or structural
testing .White Box testing(which was done by developer)

White-Box Testing is concerned with the implementation of the program.


In this type of testing ,different programming structures and data
structures used in the program are tested for proper operations .This test
concentrates on the examination of coding .
Statement Testing (Algebraic Testing): Test single statements
Loop Testing:
Cause execution of the loop to be skipped completely. (Exception: Repeat
loops)
Loop to be executed exactly once
Loop to be executed more than once

Path testing:
Make sure all paths in the program are executed
Branch Testing (Conditional Testing): Make sure that each possible outcome
from a condition is tested at least once)

If ( I=TRUE)print( YES\n);else print(NO\n);


Test cases: 1) I =TRUE;2) I =FALSE

White-Box Testing

LOOP TESTING

Simple
loop

Nested
Loops

Concatenated
Unstructured
Loops
Loops
Why is loop testing important?

Comparison of White & Black-box Testing


White-box Testing:
Potentially infinite number of
paths have to be tested
White-box testing often tests what
is done, instead of what should be
done
Cannot detect missing use cases

Black-box Testing:
Potential combinatorial explosion
of test cases (valid & invalid data)
Often not clear whether the
selected test cases uncover a
particular error
Does not discover extraneous use
cases ("features")

Both types of testing are needed


White-box testing and black box
testing are the extreme ends of
a testing continuum.
Any choice of test case lies in
between and depends on the
following:
Number of possible logical
paths
Nature of input data
Amount of computation
Complexity of algorithms and
data structures

Examples of Faults and Errors


Faults in the Interface specification
Mismatch between what the client
needs and what the server offers
Mismatch between requirements
and implementation
Algorithmic Faults
Missing initialization
Branching errors (too soon, too
late)
Missing test for nil

Mechanical Faults (very hard to


find)
Documentation does not
match actual conditions or
operating procedures
Errors
Stress or overload errors
Capacity or boundary errors
Timing errors
Throughput or performance
errors

How to Deal with Errors


Error prevention

Error detection

Testing:

Debugging:

Monitoring:
Error recovery

What is this?
A failure?
An error?
A fault?
Need to specify
the desired behavior first!

Erroneous
State

Algorithmic Fault

You might also like