Chapter 14
Software Testing Techniques
CHAPTER OVERVIEW AND COMMENTS
This intent of this chapter is to introduce a variety of black-box and white-box testing methods that can be used for both conventional and object-oriented software.
14.1 Software Testing Fundamentals
Formal reviews by themselves cannot locate all software errors. Testing occurs late in the software development process and is the last chance to catch bugs prior to customer release.
Testability: “is simply how easily a computer program can be tested.”
The following characteristics lead to testable software:
Operability: it operates cleanly if implemented with quality in mind
Observability: the results of each test case are readily observed. Variables are visible during execution. Source code is available.
Controllability: the degree to which testing can be automated and optimized
Decomposability: testing can be targeted; independent modules can be tested independently.
Simplicity: reduce complex architecture and logic to simplify tests; code simplicity è coding standards.
Stability: few changes are requested during testing, the S/w recovers well from failures.
Understandability: Changes to the design are communicated to the testers.
Test Characteristics
14.2 Black-Box and White-Box Testing
This section discusses the differences between black-box and white-box testing.
"Bugs lurk in corners and congregate at boundaries ..."
Black-Box testing alludes to tests that are conducted at the software interface. It examines some fundamental aspects of a system with little regard for the internal logical structure of the software.
White-Box testing is predicated on close examination of procedural detail. Logic paths through the S/W and collaborations between components are tested by providing test cases that exercise sets of conditions and/or loops.
14.3 White-Box Testing
This section makes the case that white-box testing is important, since there are many program defects (e.g. logic errors) that black-box testing can not uncover.
Sometimes called glass-box testing, is a test case design philosophy that uses the control structure described as part of component-level design to derive test cases.
The S/W eng. can derive test cases that:
14.4 Basis Path Testing
This section describes basis path testing as an example of a white-box testing technique.
Basis Path Testing is a white-box testing technique which enables the test case designer to derive logical complexity measure of procedural design and use this measure as a guide for defining a set of execution paths.
Test cases derived to exercise the basis set are guaranteed to execute every statement in the program at least once time during testing.
14.4.1 Flow Graph Notation
A flowchart is used to depict program control structure. Each circle, called a flow graph node, represents one or more procedural statements. A sequence of boxes and decision diamond can map into a single node. The arrows on the flow graph, called edges or links, represent flow of control and are analogous to flowchart arrows.
An edge must terminate at a node, even if the node does not represent any procedural statements.
Areas bounded by edges and nodes are called regions. When counting regions, we include the area outside the graph as a region.
14.5 Control Structure Testing
Basis path testing is one form of control structure testing. This section introduces three others (condition testing, data flow testing, loop testing). The argument given for using these techniques is that they broaden the test coverage from that which is possible using basis path testing alone.
14.6 Black-Box Testing
The purpose of black-box testing is to devise a set of data inputs that fully exercise all functional requirements for a program. It is important to know that in black-box testing the test designer has no knowledge of algorithm implementation. The test cases are designed from the requirement statements directly, supplemented by the test designer's knowledge of defects that are likely to be present in modules of the type being tested.
It is also called behavioral testing, which focuses on the functional requirements of the software.
Black-box testing attempts to find errors in the following categories:
Black-box testing tends to be applied during the later stage of testing. Tests are designed to answer the following questions:
OOT—Test Case Design
Berard [BER93] proposes the following approach:
Testing Methods
Fault-based testing
Class Testing and the Class Hierarchy
Scenario-Based Test Design
OOT Methods: Random Testing at the Class Level
Random testing
OOT Methods: Partition Testing
Partition Testing
OOT Methods: Inter-Class Testing
Inter-class testing
The tests to be designed should achieve all state coverage [KIR94]. That is, the operation sequences should cause the Account class to make transition through all allowable states.
Testing Patterns
Pattern name: pair testing
Abstract: A process-oriented pattern, pair testing describes a technique that is analogous to pair programming (Chapter 4) in which two testers work together to design and execute a series of tests that can be applied to unit, integration or validation testing activities.
Pattern name: separate test interface
Abstract: There is a need to test every class in an object-oriented system, including “internal classes” (i.e., classes that do not expose any interface outside of the component that used them). The separate test interface pattern describes how to create “a test interface that can be used to describe specific tests on classes that are visible only internally to a component.” [LAN01]
Pattern name: scenario testing
Abstract: Once unit and integration tests have been conducted, there is a need to determine whether the software will perform in a manner that satisfies users. The scenario testing pattern describes a technique for exercising the software from the user’s point of view. A failure at this level indicates that the software has failed to meet a user visible requirement. [KAN01]
Source: https://www2.southeastern.edu/Academics/Faculty/galkadi/285/notes/Chapter14.doc
Web site to visit: https://www2.southeastern.edu
Author of the text: indicated on the source document of the above text
If you are the author of the text above and you not agree to share your knowledge for teaching, research, scholarship (for fair use as indicated in the United States copyrigh low) please send us an e-mail and we will remove your text quickly. Fair use is a limitation and exception to the exclusive right granted by copyright law to the author of a creative work. In United States copyright law, fair use is a doctrine that permits limited use of copyrighted material without acquiring permission from the rights holders. Examples of fair use include commentary, search engines, criticism, news reporting, research, teaching, library archiving and scholarship. It provides for the legal, unlicensed citation or incorporation of copyrighted material in another author's work under a four-factor balancing test. (source: http://en.wikipedia.org/wiki/Fair_use)
The information of medicine and health contained in the site are of a general nature and purpose which is purely informative and for this reason may not replace in any case, the council of a doctor or a qualified entity legally to the profession.
The texts are the property of their respective authors and we thank them for giving us the opportunity to share for free to students, teachers and users of the Web their texts will used only for illustrative educational and scientific purposes only.
All the information in our site are given for nonprofit educational purposes