Static Testing is
Error
Human action that produces an incorrect result
Bug
Incorrect step, process or data definition in a program
Failure
The result of a fault ex. crash
Manual vs Automated Static Testing
Manual: Requirements testing, peer review, code walkthrough, code smell analysis…
Automated: Static code analysis, symbolic execution
Requirements Testing
Peer Review
Buddy Checking, Walkthrough, Inspection
Buddy Checking
A person other than the code author informally reviews a piece of work. No collection of data needed. Difficult to put under managerial control. No use of checklists, therefore not repeatable. Inexpensive.
Walkthrough
Used to find defects and become familiar with material. The author presents the artefact to an audience who asks questions. Can break down into arguments. Minimal documentation and no prior preparation for the audience. Not easy
Inspection
To find defects and collect data. Doesn’t examine alternative solutions. To communicate important work product information.
- Formally structured and managed peer review process
- Involve a review team with clearly defined roles
- Specific data collected during inspections
- Reviewers check an artifact against an unambiguous set of inspection criteria for that type of artefact.
Data collection promotes process and quality improvements
Inspection Roles
Automated Static Testing
Process of extracting info about a program from its source code or artefacts with intent of finding faults. Potential issues flagged.
The parser
Internal Representations
Analysis
Static vs Dynamic Analysis
(Don’t confuse this with static vs dynamic testing)
Static Analysis: Does not take program input into account. Results are applicable to all executions
Dynamic Analysis: Takes concrete inputs into account (typically one input), provides greater precision, result only applicable to that particular execution
Static Code Analysis Tools
Typical Inspection Process
Inspection - Entry
Inspection - Planning
The moderator determines the practical aspects of the inspection
- Determining size and composition of inspection team
- Determining goals of the inspection
- Determine the timing and purpose of the meetings
Inspection - Kickoff Meeting
Roles for the inspection team are assigned and clarified (moderator usually does this)
Documents, including artefact and source document, checklist and inspection rules are distributed and checked
Sometimes, the authors may be required to give a quick walkthrough of the artefact and its relation to other documentation.
Inspection - Individual Checking
Inspection - Logging Meeting
Inspection - Edit