Chapter 19 Notes
Chapter 19 Notes
Integration testing techniques, discussed in Chapter 20, often define the team's
development strategy.
There's a conflict of interest when testing begins because developers are asked
to test their own software.
7. Psychological Perspective:
Software analysis, design, and coding are constructive tasks, and developers
take pride in their work.
ITG's role is to remove the conflict of interest inherent in having developers test
their own software.
Developers are responsible for unit testing and often perform integration testing.
In some cases, ITG may report to the software quality assurance organization to
maintain a degree of independence.
The spiral moves inward from system engineering to design and coding,
decreasing the level of abstraction with each turn.
A testing strategy can also be viewed within the context of the spiral model.
Unit testing starts at the center (vortex) of the spiral, focusing on individual units.
The testing scope broadens with each outward turn on the spiral.
In agile development, the test plan is established before the first sprint meeting
and reviewed by stakeholders.
Test cases and their directions are developed as code is implemented for user
stories.
Testing results are shared with team members to allow for changes in both
existing and future code development.
A testing framework for unit testing includes drivers (for test execution) and
stubs (to replace subordinate modules) when needed.
Drivers accept test-case data, pass it to the component under test, and print
results.
Designing unit test cases before code development to ensure the code passes
the tests.
Avoid redundancy by designing unique test cases that focus on uncovering new
errors.
Use requirements and use cases to guide the creation of test cases for
functional and nonfunctional requirements.
User stories, acceptance criteria, and anti-requirements are valuable sources
for test case design.
6. Ensuring Traceability:
Ensure that each test case can be traced back to specific functional or
nonfunctional requirements.
Independent paths are traversed, ensuring that all statements are executed.
2. Flow Graphs:
Circles (nodes) represent program statements, and arrows (edges) show control
flow.
3. Cyclomatic Complexity:
Components with higher cyclomatic complexity values are prioritized for white-
box testing.
It does not guarantee error detection but aids in focusing testing e orts.
Besides basis path testing, control structure testing includes condition testing,
data flow testing, and loop testing.
Loop testing focuses on both simple loops and nested loops, with specific tests
for di erent loop iterations.
6. Simple Loops Testing:
Tests include skipping the loop, one pass, two passes, fewer passes, and more
passes than the loop's maximum.
To reduce the number of tests for nested loops, tests are conducted
incrementally from the innermost loop outward.
This approach minimizes the exponential growth of test cases for deeply nested
loops.
2. Categories of Errors:
Interface errors.
3. Late-Stage Testing:
Black-box testing involves designing test cases to answer questions such as:
It ensures that the component returns information in the correct order and data
format.
Ensures that when a component is integrated into the larger program, it doesn't
break the build.
Stubs and drivers play a role in interface testing, using test cases for
components.
They may incorporate test cases, debugging code, or checks for data passing
between components.
1. Equivalence Partitioning:
Test cases are derived from equivalence classes, focusing on valid and invalid
states.
Test cases should be designed for boundary values, including values at and just
above/below boundaries.