18
SOFTWARE TESTING SOFTWARE TESTING Techniques Made by: Ujwal P Gussain TE CMPNA Roll No:39 Under the Guidance Of: Ms Prachi Janrao

Software testing(Refer Ron Patton)

Embed Size (px)

Citation preview

SOFTWARE TESTING SOFTWARE TESTING Techniques

Made by:

Ujwal P Gussain

TE CMPNA

Roll No:39

Under the Guidance

Of:

Ms Prachi Janrao

Overview

Abstract

Problem Definition◦ Need for Software Testing?

◦ Infamous Error Case studies

◦ Software Bug and its Effects

Literature Survey

Black-Box Testing

White-Box Testing

Static Testing & Dynamic Testing

Applying the testing methods

Design for Implementation

Conclusions

ABSTRACT

Here, main testing methods and

techniques are shortly described

General Classification is outlined: two

Testing methods-“Black-Box” and

“White-Box” Testing & their frequently

used techniques

PROBLEM DEFINITION

Need for Testing software:

• Software is everywhere. However it is written by people- hence it’s not perfect.

Infamous software errors:

• 1.Disney’s Lion king:- failed as disney didn’t test the game on different PC platforms.

• II.Intel Pentium Floating Point Division Bug:-(4135835/3145727)*3145727-4135835

• The answer is zero, but old Intel CPU didn’t give the right answer.

Problem Definition Contd.. (Software Bug and its

Effects)

Any software failure is called as a Bug

Other terms used:i. Defect

ii. Variance

iii. Fault

iv. Failure

v. Problem

vi. Inconsistency

vii. Error

viii. Feature

ix. Incident

x. Anomaly

Cost of Bugs

The Costs are logarithmic-

they increase by tenfold as

the time increases

Literature Survey

Goal of software tester[1]

“The goal if the software tester is to find bugs,

find them early, and make sure they are fixed as

soon as possible”

Software Testing Fundamentals[1]

Testing the Specification.

Testing the Software with Blinders On

Examining the Code.

Testing the Software with X-Ray Glasses.

BLACK-BOX TESTING[5]

Here tester knows only

what the software is

supposed to do(he

can’t look in the box to

see how it operates

No access to software

code

He a input, he

gets a certain output

but doesn’t how or

why it happens, just

that it does.

WHITE-BOX TESTING[5]

Also called as clear

box testing

Tester can see

inside the box ie.,

has access to

program’s code

STATIC & DYNAMIC TESTING[1]

• Refers testing to something which is not running-examining and reviewing it.

STATIC TESTING:-

• testing the software by running it(normally what we think of as testing).

DYNAMIC TESTING:-

TESTING THE

SPECIFICATION[1]

Also called Static Black-Box Testing.

How is it Done??

Stati

c

BlackBo

x

• Pretend to be the Customer.

• Research Existing Standards & Guidelines.

• Review & Test Similar Software.

High level Review

• Specification Attribute Checklist.

• Specification Terminology ChecklistLow level Review

Attribute CheckList

1. Complete 2. Accurate 3. Precise, Unambigous, Clear

4. Consistent 5. Relevant 6. Feasible

Terminology CheckList

1. Always, Every, All, None, Never

2. Certainly, Therefore, Clearly

3. Some, Sometimes, Often, Usually,Etc., And So Forth, And So On,

Such As

4. 5.If…Then…(missing Else)

TESTING THE SOFTWARE

WITH BLINDERS ON[1]

Also called as Dynamic Black-Box

Testing.

How is it Done??

Dynami

c

BlackBo

x

Data Testing:

1) Boundary Conditions:

2) Sub-Boundary Conditions:- (refers to internal boundaries)

3) Default, Empty, Blank, Zero or None.

4) Invalid, Incorrect, Wrong, Garbage.

State Testing:

Testing s/w logic flow(by creating state transition map).

int data[]=new int[5];

for(int i=1;i<5;i++)

data[i]=-1;

data[1]=-1

data[2]=-1

data[3]=-1 what about

data[0]???

data[4]=-1

EXAMINING THE CODE[1]

Also called Static White Box testing

How is it Done??

What is to be done??

1. Formal

Reviews.

2. Peer Reviews.

3. WalkThroughs

4. Inspections.Coding Standards and Guidelines

Generic Code Review Checklist

Stati

cWhitebox

TESTING THE SOFTWARE

WITH XRAY GLASSES[1]

Also called as Dynamic White-Box

Testing

How is it Done??

Code Coverage

◦ Statement Coverage

◦ Branch Coverage

◦ Condition Coverage

If Date=01-01-2000

Lines 1,2,3,4,5,6,7

If Date<>01-01-2000

Lines 1,2,5,6,7

Code Coverage

1. PRINT “Hello World”

2. IF Date$ = “01-01-2000”

THEN

3. PRINT “Happy New Year”

4. END IF

5. PRINT “The date is: “; Date$

6. PRINT “The time is: “; Time$

7. END

◦ Consider the following code1. PRINT “Hello World”

2. IF Date$ = “01-01-2000” AND Time$ = “00:00:00”

THEN

3. PRINT “Happy New Year”

4. END IF

5. PRINT “The date is: “; Date$

6. PRINT “The time is: “; Time$

7. END

Date=01-01-0000 & Time=11:11:11

• Lines 1,2,5,6,7

Date=01-01-0000 & Time=00:00:00

:-

• Lines 1,2,5,6,7

Date=01-01-2000 & Time=11:11:11 :-

• Lines 1,2,5,6,7

Date=01-01-2000 & Time=00:00:00

• Lines 1,2,3,4,5,6,7

PRINT “Hello World”

Date=

01/01/2000

Time=

00:00:00

PRINT ”Happy New Year”

PRINT Date

PRINT Time

YES

YES

NONO

1

2

2

34

5

67

Condition 1 Condition 2

DFD Diagram

Check if

input is

proper

User

Sort the

input list

Enter a List of numbers

to be sorted

Return sorted list

Ask for re input

(improper)

Proper input

CONCLUSIONS

Software testing is a component of softwarequality control (SQC).

If customers are dissatisfied with a product,they will never recommend that product, soproduct’s cost and its popularity at the marketwill decrease.

Eventual bugs and defects reduceapplication functionality, do not lookvocational, and disturb company’s reputation.

Hence, radically Testing is very important toconduct.

At that way, the defects can be discoveredand repaired.

REFERENCES

1. Ron Patton “Software Testing”

2. http://www.his.sunderland.ac.uk/~cs0mel/comm83wk5.doc, February 08, 2009.

3. Stacey, D. A., “Software Testing Techniques”

4. Guide to the Software Engineering Body of Knowledge, Swebok – A project of the IEEE Computer Society Professional Practices Committee, 2004.

5. “Software Engineering: A Practitioner’s Approach, 6/e; Chapter 14: Software Testing Techniques”, R.S.Pressman & Associates, Inc., 2005.

6. Myers, Glenford J., IBM Systems Research Institute, Lecturer in Computer Science, Polytechnic Institute of New York, “The Art of Software Testing”, Copyright 1979. by John Wiley & Sons, Inc.

Thank you