22
BLACK BOX TESTING By Arun pandey

Sorfware engineering presentation (software testing)

Embed Size (px)

Citation preview

BLACK BOX

TESTING

By Arun pandey

What is Black-box Testing?

Black-box testing is a method of software testing that examines thefunctionality of an application without peering into its internal structures orworkings

This method of attempts to find errors

in the following categories

• Incorrect or missing functions

• Interface errors

• Errors in data structures or external database access

• Behavior or performance errors

• Initialization and termination errors

LEVELS APPLICABLE TO

Black Box Testing method is applicable to all levels of the software

testing process:

• Unit Testing

• Integration Testing

• System Testing

• Acceptance Testing

• The higher the level, and hence the bigger and more complex the box, the

more black box testing method comes into use.

BLACK BOX TESTING

ADVANTAGES

• Tests are done from a user’s point of view and will help in exposing

discrepancies in the specifications

• Tester need not know programming languages or how the software has been

implemented

• Tests can be conducted by a body independent from the developers, allowing

for an objective perspective and the avoidance of developer-bias

• Test cases can be designed as soon as the specifications are complete

BLACK BOX TESTING

DISADVANTAGES

• Only a small number of possible inputs can be tested and many program paths

will be left untested

• Without clear specifications, which is the situation in many projects, test cases

will be difficult to design

• Tests can be redundant if the software designer/ developer has already run a

test case.

• Ever wondered why a soothsayer closes the eyes when foretelling events? So

is almost the case in Black Box Testing.

STRUCTRURAL TESTING

What is Structural Testing?

• Method of testing the application at the level of the source code.

• known as white-box testing, clear box testing, glass box testing,transparent box testing, and structural testing

• programming skills, are used to design test cases.

• applied at the unit, integration and system levels of the software testingprocess.

• These different techniques exercise every visible path of the source code tominimize errors and create an error-free environment.

• knowledge of the internal implementations of the code.

Simple Example of Structural Testing

Uses of Structural Testing

• tests internal structures of software.

• To find how the software is implemented, and how it works.

• To create an error free environment by examining any fragile code

• to prevent any hidden errors.

• Prevent Logical error.

• Typographical errors and syntax checking.

Advantages of Structural Testing

• The tester can identify objects pro grammatically. This can be useful when the GUI is frequently changing.

• It can improve stability and re usability of test cases .

• By testing each path completely it is possible for a tester to achieve thoroughness.

Disadvantage of Structural Testing

• High degree of complexity

• Requires highly skilled people to develop the test cases.

EQUIVALENCE PARTITIONING

What is Equivalence Partitioning?

• Equivalence Partitioning is a software test design technique that involves

dividing input values into valid and invalid partitions and selecting

representative values from each partition as test data.

• Equivalence partitioning (also called Equivalence Class Partitioning or

ECP) is a software testing technique that divides the input data of a software

unit into partitions of equivalent data from which test cases can be derived

Equivalence Partitioning

• The input data and number of program can be divided into number of classes.

These class most have a common characteristics.

• One system approach to defect testing is based on identifying all equivalence

partition which must be handled by a program.

• Once you have identify a set of partition, you then choose test cases from each

of these partition.

Equivalence Partitioning

• In principle, test cases are designed to cover each partition at least once. This technique tries to define test cases that uncover classes of errors, thereby reducing the total number of test cases that must be developed.

• An advantage of this approach is reduction in the time required for testing a software due to lesser number of test cases.

• In general an input has certain ranges which are valid and other ranges which are invalid.

Equivalence Partitioning :-

• Example:Invalid inputs

Valid inputs

system

outputs

Path Testing

What is Path Testing ?

Typical white box testing but nowadays also used in black box tests.

Is a structural testing method that involves using the source code of a program

to attempt to find every possible executable path.

Aims to derive a logical complexity measure of a procedural design and use

this as a guide for defining a basic set of execution paths.

Path Testing(cont..)

The objective of path testing is to ensure that the set of test cases is such that

each path through the program is executed at least once.

The starting point for path testing is a program flow graph that shows nodes

representing program decisions and arcs representing the flow of control.

Statements with conditions are therefore nodes in the flow graph.

Benefits of path testing

Defines the number of independent paths thus the number of test cases needed to

ensure:

♦ Every statement will be executed at least one time

♦ Every condition will be executed on its true & false sides

Focuses attention on program logic

Facilitates analytical versus arbitrary test case design.