Purpose of unit Tests:
- Tests all loops.
- Test basis paths.
- Test conditional statements.
- Test data structures.
Reasons for white box testing:
- Normal path processing can be well understood.
- Exception handling is less well scrutinized or specified in requirement and when coded is therefore more susceptible to errors.
- Likely that a type will be discovered in an obscure logic path as a main processing path.
- Black box testing is much less likely to uncover subtle logic errors (more appropriate for higher level tests of functionality).
Developing Unit Tests:
- Identify units to be unit-tested.
- Identify test cases.
- Develop the test cases.
Basis path testing:
- Tom McCabe’s cyclomatic complexity metric:
· Measures the logical complexity of a procedural design.
· Provides flow-graph notation to identify independent paths of processing.
· Once paths are identified, tests can be developed for loops, conditions.
· Process guarantees that every statement will get executed atleast once.
Developing Unit Tests:
- Compute cyclomatic complexity of all complex units.
- Identify units in the 20th percentile of complexity: those most critical/complex.
- Define basis paths for all units.
- Define predicate test (conditional tests) for all units in the 20th percentile.
Flow Chart Notation
Flow graph Notation – Edges, nodes & regions
V(G) = E – N + 2 = 11 – 9 + 2 = 4
V(G) = P + 1 = 3 + 1 = 4
V(G) = the number of regions (closed spaces, plus the open space) = 4
Flow Graph Notation:
- Predicate nodes are any nodes with branching.
A Unique/Independent path:
- Is one where atleast one new edge is transverse.
Basis Path Set:
- Is a set of paths where all unique/independent paths are represented. Ie, the set is not unique.
Hello Srihari,
ReplyDeleteThe informative Article on Reasons for white box testing: is good. It gives detailed information about it .Thanks for Sharing the information on Reason for White Box Testing. Software Testing Company
Really nice topics you had discussed above. I am much impressed. Thank you for providing this nice information here.
ReplyDeleteSoftware Testing Company
QA Services
Game Testing Companies
Console Game Testing
good information.
ReplyDeleteSoftware Testing Training in Chennai | Certification | Online Courses
Software Testing Training in Chennai | Certification | Online Training Course | Software Testing Training in Bangalore | Certification | Online Training Course | Software Testing Training in Hyderabad | Certification | Online Training Course | Software Testing Training in Coimbatore | Certification | Online Training Course | Software Testing Training in Online | Certification | Online Training Course
The Article on Mobile testing Services is awesome nice description, thanks for sharing the information about it.Mobile app testing Services and load testing services.
ReplyDelete