Manual Testing Guide
Manual Testing Guide
Software Testing: Testing is a process of executing a program with the intent of finding error.
Software Engineering: Software Engineering is the establishment and use of sound engineering
principles in order to obtain economically software that is more reliable and works efficiently on
real machines.
Planning: To provide a framework that enables the management to make reasonable estimates of
Resources Cost Schedules Size
Requirements Analysis: Data, Functional and Behavioral requirements are identified.
Data Design: Transforms the information domain model into the data structures that will be
required to implement the software.
Architectural design: Relationship between major structural elements of the software. Represents
the structure of data and program components that are required to build a computer based
system.
Interface design: Creates an effective communication medium between a human and a computer.
Component level Design: Transforms structural elements of the software architecture into a
procedural description of software components.
Coding: Translation into source code (Machine readable form)
Testing: Testing is a process of executing a program with the intent of finding error
Unit Testing: It concentrates on each unit (Module, Component) of the software as
implemented in source code.
Integration Testing: Putting the modules together and construction of software architecture.
System and Functional Testing: Product is validated with other system elements are tested as a
whole
User Acceptance Testing: Testing by the user to collect feed back.
Maintenance: Change associated with error correction, adaptation and enhancements.
Correction: Changes software to correct defects.
High Level Design Document (HLDD): Consists of the overall hierarchy of the system in terms
of modules.
Low Level Design Document (LLDD): Consists of every sub module in terms of Structural
logic (ERD) and Backend Logic(DFD)
White Box Testing: A coding level testing technique to verify completeness and correctness of
the programs with respect to design. Also called as Glass BT or Clear BT
Grey Box Testing: Combination of white box and black box testing.
Software Quality Assurance(SQA): SQA concepts are monitoring and measuring the strength
of development process.
Ex: LCT (Life Cycle Testing)
Quality:
Meet customer requirements
Meet customer expectations (cost to use, speed in process or performance, security)
Possible cost
Time to market
For developing the quality software we need LCD and LCT
LCD: A multiple stages of development stages and the every stage is verified for completeness.
V model:
Build: When coding level testing over. it is a completely integration tested modules. Then it is
called a build. Build is developed after integration testing. (.exe)
Test Management: Testers maintain some documents related to every project. They will refer
these documents for future modifications.
Change Request: The request made by the customer to modify the software.
BBT, UAT and Test management process where the independent testers or testing team will be
involved.
Refinement form of V-Model: Due to cost and time point of view v-model is not applicable to
small scale and medium scale companies. This type of organizations are maintaining a
refinement form of v-model.
During the requirements analysis all the requirements are analyzed. at the end of this phase
S/wRS is prepared. It consists of the functional (customer requirements) + System Requirements
(h/w + S/w) requirements. It is prepared by the system analyst.
During the design phase two types of designs are done. HLDD and LLDD. Tech Leads will be
involved.
During unit testing, they conduct program level testing with the help of WBT techniques.
During the Integration Testing, the testers and programmers or test programmers integrating the
modules to test with respect to HLDD.
During the system and functional testing the actual testers are involved and conducts tests based
on S/wRS.
During the UAT customer site people are also involved, and they perform tests based on the
BRS.
From the above model the small scale and medium scale organizations are also conducts life
cycle testing. But they maintain separate team for functional and system testing.
After the completion of above like design documents, they (tech leads) concentrate on review of
the documents for correctness and completeness. In this review they can apply the below factors.
Unit Testing:
After the completion of design and their reviews programmers are concentrating on coding.
During this stage they conduct program level testing, with the help of the WBT techniques. This
WBT is also known as glass box testing or clear box testing.
WBT is based on the code. The senior programmers will conduct testing on programs WBT is
applied at the module level.
1.
Execution Testing
Basis path coverage (correctness of every statement execution.)
Loops coverage (correctness of loops termination.)
Program technique coverage (Less no of Memory Cycles and CPU cycles during
execution.)
1.
Operations Testing: Whither the software is running under the customer expected
environment platforms (such as OS, compilers, browsers and etcsys s/w.)
Integration Testing: After the completion of unit testing, development people concentrate on
integration testing, when they complete dependent modules of unit testing. During this test
programmers are verifying integration of modules with respect to HLDD (which contains
hierarchy of modules).
Bottom-Up: This approach starts testing, from lower-level modules. drivers are used to connect
the sub modules. ( ex login, create driver to accept default uid and pwd)
Sandwich: This approach combines the Top-down and Bottom-up approaches of the integration
testing. In this middle level modules are testing using the drivers and stubs.
System Testing:
Conducted by separate testing team
Follows Black Box testing techniques
Depends on S/wRS
Build level testing to validate internal processing depends on external interface processing
depends on external interface
Usability and System testing are called as Core testing and Performance and Security Testing
techniques are called as Advanced testing.
From the testers point of view functional and usability tests are important.
Manual Support Testing: In general, technical writers prepares user manuals after completion of
all possible tests execution and their modifications also. Now a days help documentation is
released along with the main application.
Help documentation is also called as user manual. But actually user manuals are prepared after
the completion of all other system test techniques and also resolving all the bugs.
Functional testing: During this stage of testing, testing team concentrate on " Meet Customer
Requirements". For performing what functionality, the system is developed met or not can be
tested.
For every project functionality testing is most important. Most of the testing tools, which are
available in the market are of this type.
System Testing
|
|
80 % --->
Functional Testing
|
|
80 %
--->
Functionality or Requirements Testing: During this subtest, test engineer validates correctness
of every functionality in our application build, through below coverage.
If they have less time to do system testing, they will be doing Functionality Testing only.
Functionality or Requirements Testing has following coverages
Input Domain Testing: During this test, the test engineer validates size and type of every input
object. In this coverage, test engineer prepares boundary values and equivalence classes for
every input object.
Ex: A login process allows user id and password. User id allows alpha numeric from 4-16
characters long. Password allows alphabet from 4-8 characters long.
Recovery Testing: This test is also known as Reliability testing. During this test, test engineers
validates that, whether our application build can recover from abnormal situations or not.
Ex: During process power failure, network disconnect, server down, database disconnected etc
Backward compatibility:
The application is not ready to run on the technology or environment.
Configuration Testing: This test is also known as Hardware Compatibility testing. During this
test, test engineer validates that whether our application build supports different technology i.e.
hardware devices or not?
Inter Systems Testing: This test is also known as End-to-End testing. During this test, test
engineer validates that whither our application build coexistence with other existing software in
the customer site to share the resources (H/w or S/w).
Installation Testing: Testing the applications, installation process in customer specified
environment and conditions.
Parallel or Comparitive testing: During this test, test engineer compares our application build
with similar type of applications or old versions of same application to find competitiveness.
Storage Testing:
Execution of our application under huge amounts of resources to estimate storage limitations to
be handled by our application is called as Storage Testing.
Security Testing: It is also an advanced testing technique and complex to apply. To conduct this
tests, highly skilled persons who have security domain knowledge.
Access Control: Also called as Privileges testing. The rights given to a user to do a system task.
Encryption / Decryption:
Encryption- To convert actual data into a secret code which may not be understandable to
others.
Decryption- Converting the secret data into actual data.
User Acceptance Testing: After completion of all possible system tests execution, our
organization concentrate on user acceptance test to collect feed back.
To conduct user acceptance tests, they are following two approaches like Alpha () - Test and
Beta () -Test.
Note: In s/w development projects are two types based on the products like software application
( also called as Project ) and Product.
Software Application ( Project ) : Get requirements from the client and develop the project.
This software is for only one company. And has specific customer. For this Alpha test will be
done.
Product : Get requirements from the market and develop the project. This software may have
more than one company. And has no specific customer. For this - Version or Trial version will
be released in the market to do Beta test.
During this Port testing Release team validate below factors in customer site:
During utilization of our application by customer site people, they are sending some Change
Request (CR) to our company. When CR is received the following steps are done
Based on the type of CR there are two types,
Enhancement
Missed Defect
Reviews in Analysis
Reviews in Design
Unit Testing
Senior Programmer.
Integration Testing
Port Testing
Release Team.
Testing Stages
Roles
Reviews in Analysis
Reviews in Design
Unit Testing
Senior Programmer.
Integration Testing
Test Engineer.
team.
Port Testing
Release Team.
Testing Team:
From refinement form of V-Model small scale companies and medium scale companies are
maintaining separate testing team for some of the stages in LCT.
In their teams organisation maintains below roles
Testing Terminology:-
Monkey / Chimpanzee Testing: The coverage of main activities only in your application during
testing is called as monkey testing.(Less Time)
Gerilla Testing: To cover a single functionality with multiple possibilities to test is called Gerilla
ride or Gerilla Testing. (No rules and regulations to test a issue)
Exploratory Testing: Level by level of activity coverage of activities in your application during
testing is called exploratory testing. (Covering main activities first and other activities next)
Sanity Testing: This test is also known as Tester Acceptance Test (TAT). They test for whither
developed team build is stable for complete testing or not?
Smoke Testing: An extra shakeup in sanity testing is called as Smoke Testing. Testing team
rejects a build to development team with reasons, before start testing.
Bebugging: Development team release a build with known bugs to testing them.
Bigbang Testing: A single state of testing after completion of all modules development is called
Bigbang testing. It is also known as informal testing.
Incremental Testing: A multiple stages of testing process is called as incremental testing. This is
also known as formal testing.
Static Testing: Conduct a test without running an application is called as Static Testing.
Ex: User Interface Testing
Dynamic Testing: Conduct a test through running an application is called as Dynamic Testing.
Manual Vs Automation: A tester conduct a test on application without using any third party
testing tool. This process is called as Manual Testing.
A tester conduct a test with the help of software testing tool. This process is called as
Automation.
For verifying the need for automation they will consider following two types:
Criticality indicates complex to apply that test manually. Impact indicates test repetition.
Retesting: Re execution of our application to conduct same test with multiple test data is called
Retesting.
Regression Testing: The re execution of our test on modified build to ensure bug fix work and
occurrences of side effects is called regression testing.
Selection of Automation: Before starting one project level testing by one separate testing team,
corresponding project manager or test manager or quality analyst defines the need of test
automation for that project depends on below factors.
Manual.
Automation.
Testing Policy: It is a company level document and developed by QC people. This document
defines testing objectives, to develop a quality software.
Test Strategy:
Scope & Objective: Definition, need and purpose of testing in your in your organization
Business Issues: Budget Controlling for testing
Test approach: defines the testing approach between development stages and testing factors.
TRM: Test Responsibility Matrix or Test Matrix defines mapping between test factors and
development stages.
Test environment specifications: Required test documents developed by testing team during
testing.
Roles and Responsibilities: Defines names of jobs in testing team with required responsibilities.
Communication & Status Reporting: Required negotiation between two consecutive roles in
testing.
Testing measurements and metrics: To estimate work completion in terms of Quality Assessment,
Test management process capability.
Test Automation: Possibilities to go test automation with respect to corresponding project
requirements and testing facilities / tools available (either complete automation or selective
automation)
Defect Tracking System: Required negotiation between the development and testing team to fix
defects and resolve.
Change and Configuration Management: required strategies to handle change requests of
customer site.
Risk Analysis and Mitigations: Analyzing of future common problems appears during testing and
possible solutions to recover.
Training plan: Need of training for testing to start/conduct/apply.
Test Factor: A test factor defines a testing issue. There are 15 common test factors in S/w
Testing.
Ex:
QC Quality
PM/QA/TM Test Factor
TL Testing Techniques
TE Test cases
PM/QA/TM Portable
TL Compatibility Testing
TE Run on different OS
Test Factors:
Authorization: Validation of users to connect to application
Security Testing
Functionality / Requirements Testing
Access Control: Permission to valid user to use specific service
Security Testing
Functionality / Requirements Testing
Audit Trail: Maintains metadata about operations
Error Handling Testing
Functionality / Requirements Testing
Correctness: Meet customer requirements in terms of functionality
All black box Testing Techniques
Continuity in Processing: Inter process communication
Execution Testing
Operations Testing
Coupling: Co existence with other application in customer site
Inter Systems Testing
Ease of Use: User friendliness
User Interface Testing
Manual Support Testing
Ease of Operate: Ease in operations
Installation testing
File Integrity: Creation of internal files or backup files
Recovery Testing
Functionality / Requirements Testing
Reliability: Recover from abnormal situations or not. Backup files using or not
Recovery Testing
Stress Testing
Portable: Run on customer expected platforms
Compatibility Testing
Configuration Testing
Performance: Speed of processing
Load Testing
Stress Testing
Data Volume Testing
Storage Testing
Service Levels: Order of functionalities
Stress Testing
Functionality / Requirements Testing
Methodology: Follows standard methodology during testing
Compliance Testing
Maintainable: Whither application is long time serviceable to customers or not
Compliance Testing (Mapping between quality to testing connection)
Quality Gap: A conceptual gap between Quality Factors and Testing process is called as Quality
Gap.
Test Methodology: Test strategy defines over all approach. To convert a over all approach into
corresponding project level approach, quality analyst / PM defines test methodology.
Step 1: Collect test strategy
Step 2: Project type
Project Type
Codin
g
System Maintenance
Testing
Traditional
Off-theShelf
Maintenance
Step 3: Determine application type: Depends on application type and requirements the QA
decrease number of columns in the TRM.
Step 4: Identify risks: Depends on tactical risks, the QA decrease number of factors (rows) in the
TRM.
Step 5: Determine scope of application: Depends on future requirements / enhancements, QA try
to add some of the deleted factors once again. (Number of rows in the TRM)
Step 6: Finalize TRM for current project
PET (Process Experts Tools and Technology): It is an advanced testing process developed by
HCL, Chennai.This process is approved by QA forum of India. It is a refinement form of VModel
Test Planning: After completion of test initiation, test plan author concentrates on test plan
writing to define what to test, how to test, when to test and who to test .
What to test
- Development Plan
How to test
- S/wRS
When to test
- Design Documents
Who to test
1.
- Team Formation
Team Formation
In general test planning process starts with testing team formation, depends on below factors.
Availability of Testers
Test Duration
Availability of test environment resources
The above three are dependent factors.
Test Duration:
Common market test team duration for various types of projects.
- C, C++
- Prolog, LISP
- 3-5 months
- 12-15 months
2.
After completion of team formation, test plan author concentrates on risks analysis and
mitigations.
1)
2)
Lack of budget
3)
4)
5)
6)
7)
3.
Format:
1)
2)
3)
4)
5)
6)
7)
8)
9)
10) Testing tasks: what are the necessary tasks to do before starting testing
11) Approach: List of Testing Techniques to apply
12) Staff and training needs: Names of selected testing Team
13) Responsibilities: Work allocation to above selected members
14) Schedule: Dates and timings
15) Risks and mitigations : Common non technical problems
16) Approvals: Signatures of PM/QA and test plan author
4.
After completion of test plan writing test plan author concentrate on review of that document for
completeness and correctness. In this review, selected testers also involved to give feedback. In
this reviews meeting, testing team conducts coverage analysis.
Test Design:
After completion of test plan and required training days, every selected test engineer
concentrate on test designing for responsible modules. In this phase test engineer prepares a list
of testcases to conduct defined testing, on responsible modules.
There are three basic methods to prepare testcases to conduct core level testing.
TestCase Format:
After completion of testcases selection for responsible modules, test engineer prepare an IEEE
format for every test condition.
Test Environment: Required H/w and S/w to execute the test cases
Test Effort: (Person Per Hour or Person / Hr) Time to execute this test case ( 20 Mins )
Test Duration: Date of execution
Test Setup: Necessary tasks to do before start this case execution
Test Procedure: Step by step procedure to execute this testcase.
TestCase Pass/Fail Criteria: When that testcase is Pass, When that testcase is fail
ECP ( Type )
Input Attribute
Valid
Invalid
Maximum
For preparing this UI testcases they are not studying S/wRS, LLDD etc
Functionality testcases source: S/wRS. I/P domain testcases source: LLDD
Testcase7: Meaningful Help messages or not?(First 6 tc for uit and 7 manual support testing)
Review Testcases: After completion of testcases design with required documentation [IEEE] for
responsible modules, testing team along with test lead concentrate on review of testcases for
completeness and correctness. In this review testing team conducts coverage analysis
TestCases
*****
*
*
*****
*
*
*****
*
*
During this testing, testing team observes below factors on that initial build.
Test Automation: After receiving a stable build from development team, testing team
concentrate on test automation.
Test Automation two types: Complete and Selective.
Level-2 Regression Testing: Actually this Regression testing is part of Level-1 testing. During
comprehensive test execution, testing team reports mismatches to development team as defects.
After receiving that defect, development team performs modifications in coding to resolve that
accepted defects. When they release modified build, testing team concentrate on regression
testing before conducts remaining comprehensive testing.
Severity: Seriousness of the defect defined by the tester through Severity (Impact and
Criticality) importance to do regression testing. In organizations they will be giving three types
of severity like High, Medium and Low.
High: Without resolving this mismatch tester is not able to continue remaining testing. (Show
stopper).
Medium: Able to continue testing, but resolve must.
Low: May or may not resolve.
Ex:
Case 1: If development team resolved bug and its severity is high, testing team will re execute
all P0, P1 and carefully selected P2 test cases with respect to that modification.
Case 2: If development team resolved bug and its severity is medium, testing team will re
execute all P0, selected P1 [80-90 %] and some of P2 test cases with respect to that modification.
Case 3: If development team resolved bug and its severity is low, testing team will re execute
some of the P0, P1, P2 test cases with respect to that modification.
Case 4: If development team performs modifications due to project requirement changes, testing
team reexecute all P0 and selected testcases.
Resolution Type:
There are 12 resolution types such as
Duplicate: Rejected due to defect like same as previous reported defect.
Enhancement: Rejected due to defect related to future requirement of the customer.
H/w Limitation: Raised due to limitations of hardware (Rejected)
S/w Limitation: Rejected due to limitation of s/w technology.
Functions as design: Rejected due to coding is correct with respect to design documents.
Not Applicable: Rejected due to lack of correctness in defect.
No plan to fix it: Postponed part timely (Not accepted and rejected)
Need for More Information: Developers want more information to fix. (Not accepted and
rejected)
Not Reproducible: Developer want more information due to the problem is not reproducible.
(Not accepted and rejected)
User misunderstanding: (Both argues you r thinking wrong) (Extra negotiation between tester
and developer)
Fixed: Opened a bug to resolve (Accepted)
Types of Bugs:
Version Control bugs: (Medium severity) Difference between two consecutive versions
Test Closure:
After completion of all possible testcase execution and their defect reporting and tracking, test
lead conduct test execution closure review along with test engineers.
Testing team try to execute the high priority test cases once again to confirm correctness of
master build.
Alpha testing
Beta testing
SignOff:
After completion of UA and then modifications, test lead creates Test Summary Report (TSR). It
is a part of s/w release note. This TSR consists of
Description
Responsibility
Completion Time
TestCase Selection
Test Engineer
20-30 days
TestCase Review
4-5 days
RVM / RTM
Test Lead
1 day
Test Engineer
20-30 days
Test Engineer
40-60 days
Test Reporting
Weakly twice
4-5 days
5-10 days
Test Lead
1-2 days
(Sign Off)
Auditing:
During testing and maintenance, testing team conducts audit meetings to estimate status and
required improvements. In this auditing process they can use three types of measurements and
metrics.
Product Stability:
Sufficiency:
Requirements Coverage
Type Trigger Analysis (Mapping between covered requirements and applied tests)
Test Status
Executed tests
In progress
Yet to execute
Delays in Delivery
Defect Arrival Rate
Defect Resolution Rate
Defect Aging
Test Effort
Cost of finding a defect (Ex: 4 defects / person day)
Test Efficiency
Type-Trigger Analysis
Requirements Coverage
Defect Escapes
Type-Phase analysis.
(What type of defects my testing team missed in which phase of testing)
Test Effort
Cost of finding a defect (Ex: 4 defects / person day)
This topic looks at Static Testing techniques. These techniques are referred to as "static" because
the software is not executed; rather the specifications, documentation and source code that
comprise the software are examined in varying degrees of detail.
There are two basic types of static testing. One of these is people-based and the other is toolbased. People-based techniques are generally known as reviews but there are a variety of
different ways in which reviews can be performed. The tool-based techniques examine source
code and are known as "static analysis". Both of these basic types are described in separate
sections below.
reviewed).
Benefits of reviews
There are many benefits from reviews in general. They can improve software development
productivity and reduce development timescales. They can also reduce testing time and cost.
They can lead to lifetime cost reductions throughout the maintenance of a system over its useful
life. All this is achieved (where it is achieved) by finding and fixing faults in the products of
development phases before they are used in subsequent phases. In other words, reviews find
faults in specifications and other documents (including source code) which can then be fixed
before those specifications are used in the next phase of development.
Reviews generally reduce fault levels and lead to increased quality. This can also result in
improved customer relations.
apply to everything on the left-hand side of the V-model. Note that the reviews apply not only to
the products of development but also to the test documentation that is produced early in the life
cycle. We have found that reviewing the business needs alongside the Acceptance Tests works
really well. It clarifies issues that might otherwise have been overlooked. This is yet another way
to find faults as early as possible in the life cycle so that they can be removed at the least cost.
Costs of reviews
You cannot gain the benefits of reviews without investing in doing them, and this does have a
cost. As a rough guide, something between 5% and 15% of project effort would typically be
spent on reviews. If Inspections are being introduced into an organisation, then 15% is a
recommended guideline. Once the Inspection process is mature, this may go down to around 5%.
Note that 10% is half a day a week.
Remember that the cost of reviews always needs to be balanced against the cost of not doing
them, and finding the faults (which are already there) much later when it will be much more
expensive to fix them.
The costs of reviews are mainly in people's time, i.e. it is an effort cost, but the cost varies
depending on the type of review. The leader or moderator of the review may need to spend time
in planning the review (this would not be done for an informal review, but is required for
Inspection). The studying of the documents to be reviewed by each participant on their own is
normally the main cost (although in practice this may not be done as thoroughly as it should). If
a meeting is held, the cost is the length of the meeting times the number of people present. The
fixing of any faults found or the resolution of issues found may or may not be followed up by the
leader. In the more formal review techniques, metrics or statistics are recorded and analysed to
ensure the continued effectiveness and efficiency of the review process. Process improvement
should also be a part of any review process, so that lessons learned in a review can be folded
back into development and testing processes. (Inspection formally includes process
improvement; most other forms of review do not.)
Types of review
We have now established that reviews are an important part of software testing. Testers should be
involved in reviewing the development documents that tests are based on, and should also review
their own test documentation.
In this section, we will look at different types of reviews, and the activities that are done to a
greater or lesser extent in all of them. We will also look at the Inspection process in a bit more
detail, as it is the most effective of all review types.
Walkthrough
A walkthrough is typically led by the author of a document, for the purpose of educating the
participants about the content so that everyone understands the same thing. A walkthrough may
include "dry runs" of business scenarios to show how the system would handle certain specific
situations. For technical documents, it is often a peer group technique.
Inspection
An Inspection is the most formal of the formal review techniques. There are strict entry and exit
criteria to the Inspection process, it is led by a trained Leader or moderator (not the author), there
are defined roles for searching for faults based on defined rules and checklists. Metrics are a
required part of the process.
Characteristics of reviews in general
Activities
There are a number of activities that may take place for any review.
The planning stage is part of all except informal reviews.
In Inspection (and possibly other reviews), an overview or kickoff meeting is held to put
everyone "in the picture" about what is to be reviewed and how the review is to be conducted.
This pre-meeting may be a walkthrough in its own right.
The preparation or individual checking is usually where the greatest value is gained from a
review process. Each person spends time on the review document (and related documents),
becoming familiar with it and/or looking for faults. In some reviews, this part of the process is
optional (at least in practice). In Inspection it is required.
Most reviews include a meeting of the reviewers. Informal reviews probably do not, and
Inspection does not hold a meeting if it would not add economic value to the process. Sometimes
the meeting time is the only time people actually look at the document. Sometimes the meetings
run on for hours and discuss trivial issues. The best reviews (of any level of formality) ensure
that value is gained from the meeting.
The more formal review techniques include follow-up of the faults or issues found to ensure that
action has been taken on everything raised (Inspection does, as do some forms of technical or
peer review).
The more formal review techniques collect metrics on cost (time spent) and benefits achieved.
Roles and responsibilities
For any of the formal reviews (i.e. not informal reviews), there is someone responsible for the
review of a document (the individual review cycle). This may be the author of the document
(walkthrough) or an independent Leader or moderator (formal reviews and Inspection). The
responsibility of the Leader is to ensure that the review process works. He or she may distribute
documents, choose reviewers, mentor the reviewers, call and lead the meeting, perform followup and record relevant metrics.
The author of the document being reviewed or Inspected is generally included in the review,
although there are some variants that exclude the author. The author actually has the most to gain
from the review in terms of learning how to do their work better (if the review is conducted in
the right spirit!).
The reviewers or Inspectors are the people who bring the added value to the process by helping
the author to improve his or her document. In some types of review, individual checkers are
given specific types of fault to look for to make the process more effective.
Managers have an important role to play in reviews. Even if they are excluded from some types
of peer review, they can (and should) review management level documents with their peers. They
also need to understand the economics of reviews and the value that they bring. They need to
ensure that the reviews are done properly, i.e. that adequate time is allowed for reviews in project
schedules.
There may be other roles in addition to these, for example an organisation-wide co-ordinator who
would keep and monitor metrics, or someone to "own" the review process itself - this person
would be responsible for updating forms, checklists, etc.
Deliverables
The main deliverable from a review is the changes to the document that was reviewed. The
author of the document normally edits these. For Inspection, the changes would be limited to
faults found as violations of accepted rules. In other types of review, the reviewers suggest
improvements to the document itself. Generally the author can either accept or reject the changes
suggested.
If the author does not have the authority to change a related document (e.g. if the review found
that a correct design conflicted with an incorrect requirement specification), then a change
request may be raised to change the other document(s).
For Inspection and possibly other types of review, process improvement suggestions are a
deliverable. This includes improvements to the review or Inspection process itself and also
improvements to the development process that produced the document just reviewed. (Note that
these are improvements to processes, not to reviewed documents.)
The final deliverable (for the more formal types of review, including Inspection) is the metrics
about the costs, faults found, and benefits achieved by the review or Inspection process.
Pitfalls
Reviews are not always successful. They are sometimes not very effective, so faults that could
have been found slip through the net. They are sometimes very inefficient, so that people feel
that they are wasting their time. Often insufficient thought has gone into the definition of the
review process itself - it just evolves over time.
One of the most common causes for poor quality in the review process is lack of training, and
this is more critical the more formal the review.
Another problem with reviews is having to deal with documents that are of poor quality. Entry
criteria to the review or Inspection process can ensure that reviewers' time is not wasted on
documents that are not worthy of the review effort.
A lack of management support is a frequent problem. If managers say that they want reviews to
take place but don't allow any time in the schedules for the, this is only "lip service" not
commitment to quality.
Long-term, it can be disheartening to become expert at detecting faults if the same faults keep on
being injected into all newly written documents. Process improvements are the key to long-term
effectiveness and efficiency.
Static analysis
What can static analysis do?Static analysis is a form of automated testing. It can check for
violations of standards and can find things that may or may not be faults. Static analysis is
descended from compiler technology. In fact, many compilers may have static analysis facilities
available for developers to use if they wish. There are also a number of stand-alone static
analysis tools for various different computer programming languages. Like a compiler, the static
analysis tool analyses the code without executing it, and can alert the developer to various things
such as unreachable code, undeclared variables, etc.
Static analysis tools can also compute various metrics about code such as cyclomatic complexity.
For example, in the statement "x = y + z", the variables y and z are used because the values that
they contain are being accessed and added together. The result of this addition is then put into the
memory location called x, so x is defined.
The significance of this is that static analysis tools can perform a number of simple checks. One
of these checks is to ensure that every variable is defined before it is used. If a variable is not
defined before it is used, the value that it contains may be different every time the program is
executed and in any case is unlikely to contain the correct value. This is an example of a data
flow fault. Another check that a static analysis tool can make is to ensure that every time a
variable is defined it is used somewhere later on in the program. If it isnt, then why was defined
in the first place? This is known as a data flow anomaly and although can be a perfectly harmless
fault, it can also indicate something more serious is at fault.
Cyclomatic complexity:
Cyclomatic complexity is related to the number of decisions in a program or control flow graph.
The easiest way to compute it is to count the number of decisions (diamond-shaped boxes) on a
control flow graph and add 1. Working from code, count the total number of IF's and any loop
constructs (DO, FOR, WHILE, REPEAT) and add 1. The cyclomatic complexity does reflect to
some extent how complex a code fragment is, but it is not the whole story.
Nesting levels relate to how deeply nested statements are within other IF statements. This is a
good metric to have in addition to cyclomatic complexity, since highly nested code is harder to
understand than linear code, but cyclomatic complexity does not distinguish them.
Other metrics include the number of function calls and a number of metrics specific to objectoriented code.
However, static analysis tools can find faults that are difficult to see and they give objective
quality information about the code. We feel that all developers should use static analysis tools,
since the information they can give can find faults very early when they are very cheap to fix.