3.1 Static Testing Basics Flashcards
Define static testing.
Software under test does not need to be executed for static testing. Code, processes specification, system architecture specification or other work products are evaluated through manual examination (e.g., reviews) or with the help of a tool (e.g., static analysis).
What are the objectives of static testing?
- improving quality early
- detecting defects around readability, completeness, correctness, testability, and consistency
Does static testing require more or less effort to find defects compared to dynamic testing?
Often less, since no test cases are required and tools are typically used to speed up the process.
What work products are examined by static testing?
Almost any can be. Requirement specification docs, source code, test plans, test cases, product backlog items, test charters, project docs, contracts, and models are all examples.
Work products need a structure against which they can be checked to be testable in this way (formal syntax, etc).
What value does Static Testing offer?
It can detect defects in the earliest phases of the SDLC, effectively shifting left and catching errors early.
It can identify defects which cannot be detected by dynamic testing, such as unreachable code, design patterns not implemented, defects in non-executable work.
Catching code defects with static analysis is more efficient and usually results in fewer code defects and lower overall dev costs and effort.
What types of defects are easier to find through static testing?
- Requirements defects: inconsistencies, ambiguities, contradictions, omissions, inaccuracies, duplications
- Design defect: inefficient database structures, poor modularization
- Some coding defects: undefined variables, unreachable code, duplicated code, complex code
- Deviations from standards: poor syntax, lack of adherence to coding standards or naming conventions
- Incorrect interface specifications: mismatched number, type, or order of parameters
- Some types of security vulnerabilities: buffer overflows
- Test basis coverage gaps: missing tests, etc