Page 274 - DCAP305_PRINCIPLES_OF_SOFTWARE_ENGINEERING
P. 274
Principles of Software Engineering
Notes Loop Testing
These strategies relate to testing single loops, concatenated loops, and nested loops. Independent
and dependent code loops and values are tested by this approach.
13.5.2 Type of the white box testing
Unit Testing
Unit testing, which is testing of individual hardware or software units, groups of related units.
A unit is a software component that cannot be subdivided into other components. Software
engineers write white box test cases to examine whether the unit is coded correctly. Unit testing
is important for ensuring the code is solid before it is integrated with other code. Once the code
is integrated into the code base, the cause of an observed failure is more difficult to find. Also,
since the software engineer writes and runs unit tests him or herself, companies often do not
track the unit test failures that are observed making these types of defects the most “private”
to the software engineer.
Integration Testing
Integration testing, which is testing in which software components, hardware components, or
both are combined and tested to evaluate the interaction between them Test cases are written
which explicitly examine the interfaces between the various units. These test cases can be black
box test cases, whereby the tester understands that a test case requires multiple program units
to interact. Alternatively, white box test cases are written which explicitly exercise the interfaces
that are known to the tester.
Regression Testing
Regression testing, which is selective retesting of a system or component to verify that
modifications have not caused unintended effects and that the system or component still
complies with its specified requirements. As with integration testing, regression testing can be
done via black box test cases, white box test cases, or a combination of the two White box unit
and integration test cases can be saved and rerun as part of regression testing.
13.5.3 Advantages and Disadvantages White Box Testing
Advantages
Advantages of White Box Testing are mentioned below:
• All the features and functionality within the application can be tested
• Testing can be started at the very initial stage. Tester does not need to wait for interface
or GUI to be ready for testing
• Can reduce to number of test cases to be executed during black box testing
• Helps in checking coding standards and optimizing code
• Extra code resulting in hidden defects can be removed
• Reason of failure can be known
• Identifying test data is easy because coding knowledge will be a pre requisite.
Disadvantages
Disadvantages of white box testing are mentioned below:
• Tester should be highly skilled because should have the knowledge of coding,
implementation
268 LOVELY PROFESSIONAL UNIVERSITY