0% found this document useful (0 votes)
70 views8 pages

Testing Fundamental

This document discusses software testing fundamentals and techniques. It covers: 1) The objectives of software testing are to systematically uncover errors with minimal time and effort. Testing involves executing a program to find undiscovered errors. 2) There are two classes of input for testing: the software configuration and test configuration. 3) There are two main types of testing: black box testing which examines external functions/inputs/outputs without considering internal structure, and white box testing which examines internal logic and paths.

Uploaded by

tippuraj
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
70 views8 pages

Testing Fundamental

This document discusses software testing fundamentals and techniques. It covers: 1) The objectives of software testing are to systematically uncover errors with minimal time and effort. Testing involves executing a program to find undiscovered errors. 2) There are two classes of input for testing: the software configuration and test configuration. 3) There are two main types of testing: black box testing which examines external functions/inputs/outputs without considering internal structure, and white box testing which examines internal logic and paths.

Uploaded by

tippuraj
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 8

CIS210: Software Engineering and Development

Software Testing Fundamentals


1. Software Testing
It is expected that there will be always bugs in the software as it is impossible to achieve inhuman perfection. 1.1. Testing Objectives The test objective is systematically uncover different classes of errors and to do this with a minimum amount of time. Testing is a process of executing a program with the intent of finding an error. A good test case is one that has high probability of finding an as yet undiscovered error. A successful test is one that uncovers an as yet undiscovered error.

1.2. Test Information Flow Two classes of input are provided to the test process: - a software configuration: Software Requirements Specification, Design Specification, and Source code - a test configuration: Test Plan, Test Procedure and Testing tools

2. Test Case Design


A software engineering product can be tested in one of two ways: black box testing and white box testing - black box testing - knowing the specified function that a product has been designed to perform, determine whether each function is fully operational. Black box testing examines some aspect of the system with little regard to the internal logical structure of the software. Black box tests are used to demonstrate that the software functions are operational, that input is properly accepted, output is correctly produced, and the integrity of the external information maintained.

- white box testing - knowing the internal workings of a software product, determine whether the internal operations implementing the functions perform according to the specification, and all internal components have been adequately exercised ; White box testing of software is predicated on a close examination of procedural detail. Logical paths through the software are tested by providing test cases. The status of the program is examined at various points to determine if the expected status corresponds to the actual status.

3. White-Box Testing
White box testing is a test case design method that uses the control structure to derive test cases. Using this method the software engineer can derive test cases that: - guarantee that all independent paths in a module have been exercised at least once - exercise all logical decisions after true and false sides ; - execute all loops at their boundaries and within their operational bounds ; - exercise internal data structures to ensure their validity.

3.1. Basis Paths Basis path testing is a white box testing technique that enable the test designer to derive a logical complexity measure and use it as a guide for defining a basis set of execution paths. Test cases derived to exercise the basis are guaranteed to execute every statement in the program at least one time during testing. The Cyclomatic Complexity metric- McCabe et. al. The cyclomatic complexity is a software metric that provides a quantitative measure of the logical complexity of a program. The value computed for cyclomatic complexity defines the number of independent paths in the basis set of a program and provides the upper bound for the number of tests that must be conducted in order to guarantee that all statements have been executed at least once.

An independent path is any path through the program that introduces at least one new statement or a new condition. In terms of a flow graph, an independent path must move along at least one edge that has not been traversed before. Cyclomatic complexity is computed in one of three ways: - the number of regions of the flow graph correspond to the cyclomatic complexity. - cyclomatic complexity, V( G ), for a flow graph G is defined as: V( G ) = E - N + 2 where E is the number of flow graph edges and N is the number of flow graph nodes.

- cyclomatic complexity, V( G ), for a flow graph G is defined as: V( G ) = P + 1

where P is the number of predicate nodes contained in the flow graph G. The value for V( G ) provides an upper bound on the number of tests that must be designed and executed to guarantee coverage of all program statements. 3.2. Applying Basis Path Testing The basis path testing method can be applied in the following way: - using the source code draw a corresponding flow graph - determine the cyclomatic complexity of the resultant flow graph - determine a basis set of independent paths - prepare test cases that will force execution of each path in the basis set

You might also like