What is Software Testing?
Software Testing is a process of evaluating a system by manual or automatic means and verify that it satisfies specified requirements or identify differences between expected and actual results.
Testing is an exercise to simulate a system or programme operation. It helps the programme to achieve the required goal. Testing analyze a programme with the intent of finding problems and errors that measures system functionality and quality. It also evaluates the attributes and capabilities of a program and access whether they achieve the required results.
In other words, Testing cannot show the absence of defects/errors. It demonstrates the conformance to specifications and is an indication of Software reliability and Quality.
Testing includes inspection and structured peer reviews of requirements and design, as well as execution test of code.
Why Software Testing?
Software Testing is important as it may cause mission failure, impact on operational performance and reliability if not done properly. Effective software testing helps to deliver quality software products that satisfy user's requirements, needs and expectations. If done poorly, defects are found during operation, it results in high maintenace cost and user dissatisfaction.
What is the Purpose and Benefit of Testing?
The main objective of testing is to help clearly describe system behaviour and to find defects in requirements,design, documentation, and code as early as possible.
The test process should be such that it should reduce the number of defects of the software product to be delivered to the customer. All Tests should be traceable to customer requirements.
A good testing programme will help significantly as you define early requirements and forces you to face and deal with problems as the work is done.Then,when the cost of rework is calculated,it is much lower.
What is White Box Testing?
White Box testing examines the basic programme structure and it derives the test data from the programme logic; ensuring that all statements and conditions have been executed at least once.
White box tests verify that the software design is valid and also whether it was built according to the specified design. White box testing traces to configuration management(CM)-controlled design and internal interface specifications. These specifications have been identified as an integral part of the configuration control process.
The white box testing process includes:-
This is a white box technique and there are 4 different classes of loop testing:-
Execution of each statement in a code component at least once.
Execution of each conditional branch in the code component.
Execution of paths with boundary and out-of-bounds input values.
Verification of the integrity of internal interfaces.
Verification of architecture integrity across a range of conditions.
Verification of database design and structure.
Basis Path Testing
Basis Path Testing:-
It is a white box technique. It enables test case designer to derive 'Logical Complexity Measure' of a procedural design. This measure is used as a guide for defining a basic set of execution paths. Test cases are derived that execute the basis paths. This ensures that every statement in the program is covered at least once.
Steps for Basis Path testing:-
Flow Graph notation: It's a simple notation representing control flow.
Derive Cyclomatic Complexity.
Determine the number of independent paths.
Derive test cases to exercise these paths.
It is a Software metric and a quantitative measure of the complexity of the programme. It defines number of independent paths in the basis set of a programme. The upper bound of the number of tests to be conducted is to ensure that all statements have been executed at least once.
Deriving Cyclomatic complexity V(G):-
number of simple decisions +1
number of enclosed areas +1
What is Black Box Testing?
Black box testing methods focus on the functional requirements of the software. This type of testing method attempts to find incorrect or missing functions, errors in data structures or external database access, interface errors, performance errors and initialization and termination errors.
Black box testing is conducted on integrated, functional components whose design integrity has been verified through completion of traceable white box tests. Black box testing traces to requirements focusing on system externals. It validates that the software meets the requirements irrespective of the paths of execution taken to meet each requirement. It is the type of test conducted on software that is an integration of code units.
The black box testing process includes:-
Validation of functional integrity in relation to external stimuli.
Validation of all external interfaces (including human) across a range of nominal and anomalous conditions.
Validation of the ability of the system, software,hardware to recover from or minimize the effect of unexpected oranomalous external or environmental conditions.
Validation of the system's ability to address out-of-bound input, error recovery, communication, and stress conditions.