Static Testing Flashcards

1
Q

Static Testing is

A
  • Carried out without executing the SUT
  • Complements (sometimes drives) dynamic testing
  • Can find issues earlier
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Error

A

Human action that produces an incorrect result

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Bug

A

Incorrect step, process or data definition in a program

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Failure

A

The result of a fault ex. crash

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Manual vs Automated Static Testing

A

Manual: Requirements testing, peer review, code walkthrough, code smell analysis…
Automated: Static code analysis, symbolic execution

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Requirements Testing

A
  • Complete: All requirements needed to specify the solution to the problem have been included.
  • Correct: Each requirement is free from error
  • Precise and clear: Each requirement is exact and not vague with single interpretation; easy to read
  • Consistent: no requirement conflicts with another
  • Relevant: Each item is relevant to the problem and its solution
  • Testable: During the program, coding and acceptance testing it will be possible to determine whether the requirement has been satisfied.
  • Feasible: The requirement can be implemented with available techniques, tools, resources and personnel, within the specified cost and schedule.
  • Free of unwarranted design detail: Requirements should not provide the solution details but just state the requirement
  • Manageable: requirements are expressed in such a way that each item can be changed without excessive impact on other items.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Peer Review

A

Buddy Checking, Walkthrough, Inspection

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Buddy Checking

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Walkthrough

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Inspection

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Inspection Roles

A
  • Moderator/Leader
  • Author/Producer
  • Reviewer/Reader
  • Scribe
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Automated Static Testing

A

Process of extracting info about a program from its source code or artefacts with intent of finding faults. Potential issues flagged.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

The parser

A
  • Transforms code into one or more internal representations
  • Representations are internal abstractions of the source code
  • Different types of representations facilitate different types of analyses.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Internal Representations

A
  • Abstract a particular aspect of the program into a form more suitable for automated analysis.
  • Different types of representations facilitate different types of analyses
  • Some representations are produced directly by compilers.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Analysis

A
  • Utilizes internal representations to draw conclusions
  • Each analysis type seeks to answer one or more questions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Static vs Dynamic Analysis

A

(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

17
Q

Static Code Analysis Tools

A
  • Findbugs
  • PMD
  • Checkstyle
  • Sonar
18
Q

Typical Inspection Process

A
  • Entry
  • Planning
  • Kickoff Meeting
  • Individual Checking
  • Logging Meeting
  • Edit
  • Follow Up and Exit
19
Q

Inspection - Entry

A
  • Author of artefact requests inspection
  • Artefact checked by inspection moderator to ensure entry criteria is met
  • Primary purpose is to ensure inspection time is not wasted on artefacts that contain defects that the author should have found.
20
Q

Inspection - Planning

A

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

21
Q

Inspection - Kickoff Meeting

A

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.

22
Q

Inspection - Individual Checking

A
  • Final stage of preparation.
  • Majority of defects found in inspection processes are found here.
  • During this stage an individual reviewer reads the artefact and with guidance of the inspection checklist attempts to find defects.
  • Reviewer should record issues found and make effort to determine what they consider the severity of a defect to be and classify it.
23
Q

Inspection - Logging Meeting

A
  • A planned and moderated meeting with the primary purpose of logging the issues found by the reviewers
  • All reviewers should be given a chance to raise their issues as a a scribe logs the issue being raised.
  • Important to only log issues once
  • Mod should ensure that discussion on issues is kept to a minimum to maintain continuity of the meeting
  • Some variations of this process include group defect finding as an activity at the end of the meeting
24
Q

Inspection - Edit

A
  • Editor (usually the author) is responsible for addressing all logged issues in the inspected artefact.
  • The editor decides if something is a defect or not.
  • All defects must be corrected.
  • All non-defects should also be addressed in some way
25
Q

Inspection - Follow Up and Exit

A
  • Moderator checks that all defects have been addressed (and all non-defect issues addressed if required).
  • Moderator must ensure that any defects found in a source document during inspection are forwarded to the owner of that document for correction.
  • Mod may calculate certain metrics in this stage to be analyzed to assess the effectiveness of an inspection
  • May also be used to hold a meeting to evaluate and recommend inspection process improvement
  • An inspection will be concluded when pre-defined set of inspection exit criteria have been satisfied.