Wednesday, November 30, 2011

BBT AND WBT TECHNIQUES

NOTE : CLICK ON IMAGES FOR LARGE VIEW.




BLACK BOX TECHNIQUES (BBT)

EQUIVALENCE CLASS PARTITION (ECP):

It is technique in BBT, It is designed to minimize the number of test cases by dividing tests. In such a way that the system is expected to act the same way for all tests of each
Equivalence partition.


Input values to a program are portioned into equivalent classes.

The equivalence class is determined by examining and analyzing the input data range.

In HR system, if you take any firm…

0-16 –They don’t hire
16- 18 – They can hire but on part time.
18-55 – Full time
Above 55 – Don’t hire.



0 16 18 55 100
_ ________________________________________

Classes --> 1 2 3 4


On Boundary  16, 18, 55

>16 above- 17, 19, 56
<16 below 15, 17, 54


Class 2 – On Board 16, 18

Above – 17, 19
Below – 15, 17

Class 3 – On Board- 18, 55

Above – 19, 56
Below – 17, 54

EXAMPLE 2:




BOUNDARY VALUE ANALYSIS:


Boundary & conditions are two major sources of defect in software application or product.

Typical programming errors occurs at boundaries of equivalence classes. This may be purely psychological factors.

Programming often fail to see special processing required at boundaries of equivalence classes

Programmers may improperly use less than (<) instead of less than equal to (<=)

EXAMPLE :




















ERROR GUESSING

The Test engineers are writing test cases and finding defects with their previous experience or past experience.

• Past failures
• Experience
• Brain Storming.
• What is the craziest thing we can do?
• Intuition.





Decision Table:


Decision table can be used when the outcome or logic involve in the program is based on set of decisions and rules which need to be followed.

A decision table lists various decision variables.






State Transition Diagram:


It is useful in situations when work flow modeling or data flow modeling has been done.

When a system must remember what happened before or when valid/invalid
Order of operations exists then STATE TRANSITION TABLE/TOOL is used.

It is excellent way to capture certain types of system requirements and documents internal system design.

Eg) consider a leave application system in an organization.

An employee can rise the request for leave and if he is eligible for leave (based on number of days he is already taken leave).

The application is sent to the manager for approval.
The manager then validates and appears for rejects the leave based on duration of project or reasons for taking leave etc..














WHITE BOX TESTING TECHNIQUES(WBT)


Deals the testing of internal logic & structure of the code.
Explicit knowledge of internal working of the system being tested must be known.
Glass box/open box testing.
Covers testing of code, branches, paths, statements.


WBT TECHNIQUES:

STATEMENT COVERAGE:

In this type of testing, the code is executed in such a manner that every statement of the application is executed atleast once. It helps in assuring that all the statements execute without any side effects.


BRANCH COVERAGE:

No Software application can be written in continuous mode of coding at some point/time we need to branch out the code in order to perform particular functionality.

Branch coverage testing helps in validating of all the branches in the code & make sure that no branch leads abnormal behavior of the application.

MUTATION TESTING:

It is type of testing in which the application is tested for the code that was modified after fixing particular bug or defect.

It also helps in finding out which code or which strategy of coding can help in developing the functionality effectively.


BASIS PATH TESTING:

This testing allows the test case designer to produce logical complexity measure of procedural design and use this measure as an approach for outlining a basic set of execution paths.

The test cases produce to exercise each statement in the program atleast one time during testing.


FLOW GRAPHS:

It can be used to represent the logical flow control and therefore all the execution paths that need testing.

To ellustrate, the use of flow graphs, Consider the procedure design.



CYCLOMATIC COMPLEXITY:


It is software metric that offers an indication of logical complexity of a program.
When used in context of basis path testing approach. The value is determined for Cyclomatic complexity.

It defines the number of independent paths in the basis testing of a program and ensures all the statements have been executed atleast once.




In this example, two test cases are sufficient to achieve a complete branch coverage, while four are necessary for complete path coverage. The cyclomatic complexity of the program is 4 (as the strongly connected graph for the program contains 9 edges, 7 nodes and 1 connected component) (9-7+2).

Cyclomatic Complexity = 4.

No comments:

Post a Comment