written 8.0 years ago by | • modified 8.0 years ago |
Mumbai University > Electronics Engineering > Sem 7 > Embedded System Design
Marks: 10 Marks
Year: Dec 2015
written 8.0 years ago by | • modified 8.0 years ago |
Mumbai University > Electronics Engineering > Sem 7 > Embedded System Design
Marks: 10 Marks
Year: Dec 2015
written 8.0 years ago by |
There are two main approaches for black box testing:
a. Equivalence class partitioning: The possible input values to the program are partitioned into a set of equivalence classes. An equivalence class is a set of data of the same type and can be defined by examining the input values. For e.g. if black box testing is applied for a program computing square of the input within the range 0 to 5000 then three equivalence classes can be defined. Class1 consists of numbers less than 0, class two consists of numbers in the range of 0 to 5000, both inclusive and class 3 consists of numbers greater than 5000.
b. Boundary Value Analysis: A type of programming error frequently occurs at the boundaries of different equivalence classes of inputs. For example, programmers may improperly use < instead of <=, or conversely <= for <.Boundary value analysis leads to selection of test cases at the boundaries of the different equivalence classes.
Advantages of black box testing:
a. The main advantage of black box testing is that, testers no need to have knowledge on specific programming language, not only programming language but also knowledge on implementation.
b. In black box testing both programmers and testers are independent of each other.
c. Since the black box testing is done from user point of view it helps in exposing any ambiguities or inconsistencies in the requirements specifications.
Following are the disadvantages of black box testing:
a. All the boundary conditions are difficult to detect.
b. Can be difficult to cover all portions of software implementation
Following are the different white box testing techniques:
a. Statement coverage: The statement coverage strategy aims to design test cases so that every statement in a program is executed at least once.
b. Branch coverage: In the branch coverage-based testing strategy, test cases are designed to make each branch condition to assume true and false values in turn.
c. Condition coverage: In this structural testing, test cases are designed to make each component of a composite conditional expression to assume both true and false values.
d. Path coverage: The path coverage-based testing strategy requires us to design test cases such that all linearly independent paths are executed at least once. A linearly independent path can be defined in terms of the control flow graph (CFG) of a program.
e. Data flow-based testing: Data flow-based testing method selects test paths according to the locations of the definitions and uses of different variables in a program.
Following are the advantages of white box testing:
a. Usually helps getting good coverage (tests are specifically designed for coverage).
b. Good for ensuring boundary cases and special cases get tested
Disadvantages of white box testing are:
a. White box testing might not be good at assessing functionality for unexpected behaviors arising with the end user.
b. Tests based on design might miss bigger picture system problems.
c. Tests need to be changed if implementation/algorithm changes.