Software Testing Knowledge
Software Testing Knowledge
Interesting Information
What are some recent major computers system failures caused by software bugs?
In January of 2001 newspapers reported that a major European railroad was hit by
the aftereffects of the Y2K bug. The company found that many of their newer trains
would not run due to their inability to recognize the date '31/12/2000'; the trains were
started by altering the control system's date settings.
In early 2000, major problems were reported with a new computer system in a
large suburban U.S. public school district with 100,000+ students; problems included
10,000 erroneous report cards and students left stranded by failed class registration
systems; the district's CIO was fired. The school district decided to reinstate it's original
25-year old system for at least a year until the bugs were worked out of the new system
by the software vendors.
In October of 1999 the $125 million NASA Mars Climate Orbiter spacecraft was
believed to be lost in space due to a simple data conversion error. It was determined that
the spacecraft software used certain data in English units that should have been in metric
units. Among other tasks, the orbiter was to serve as a communications relay for the Mars
Polar Lander mission, which failed for unknown reasons in December 1999. Several
investigating panels were convened to determine the process failures that allowed the
error to go undetected.
In April of 1999 a software bug caused the failure of a $1.2 billion military
satellite launch, the costliest unmanned accident in the history of Cape Canaveral
launches. The failure was the latest in a string of launch failures, triggering a complete
military and industry review of U.S. space launch programs, including software
integration and testing processes. Congressional oversight hearings were requested.
The computer system of a major online U.S. stock trading service failed during
trading hours several times over a period of days in February of 1999 according to
nationwide news reports. The problem was reportedly due to bugs in a software upgrade
intended to speed online trade confirmations.
In April of 1998 a major U.S. data communications network failed for 24 hours,
crippling a large part of some U.S. credit card transaction authorization systems as well
as other large U.S. bank, retail, and government data systems. The cause was eventually
traced to a software bug.
In November of 1997 the stock of a major health industry company dropped 60%
due to reports of failures in computer billing systems, problems with a large database
conversion, and inadequate software testing. It was reported that more than $100,000,000
in receivables had to be written off and that multi-million dollar fines were levied on the
company by government agencies.
A retail store chain filed suit in August of 1997 against a transaction processing
system vendor (not a credit card company) due to the software's inability to handle credit
cards with year 2000 expiration dates.
In November of 1996, newspapers reported that software bugs caused the 411
telephone information system of one of the U.S. RBOC's to fail for most of a day. Most
of the 2000 operators had to search through phone books instead of using their
13,000,000-listing database. The bugs were introduced by new software modifications
and the problem software had been installed on both the production and backup systems.
A spokesman for the software vendor reportedly stated that 'It had nothing to do with the
integrity of the software. It was human error.'
On June 4 1996 the first flight of the European Space Agency's new Ariane 5
rocket failed shortly after launching, resulting in an estimated uninsured loss of a half
billion dollars. It was reportedly due to the lack of exception handling of a floating-point
error in a conversion from a 64-bit integer to a 16-bit signed integer.
Software bugs caused the bank accounts of 823 customers of a major U.S. bank to
be credited with $924,844,208.32 each in May of 1996, according to newspaper reports.
The American Bankers Association claimed it was the largest such error in banking
history. A bank spokesman said the programming errors were corrected and all funds
were recovered.
3. What is testing?
The process of operating a system or component under specified conditions, observing or
recording the results, and making an evaluation of some aspect of the system or
component
Reviews also called Peer Reviews, are usually conducted on project documentation early
in the development cycle. The contents of the documents are evaluated by the reviewers
from various groups, each with their own perspective, expectations, and knowledge base.
Walkthroughs are usually groups sessions that trace processes, both existing and
proposed, in order to educate everyone of the current thinking. The documentation used
in a walkthrough may be high level logic flows. Walkthroughs are also sources of tests
for the test inventory.
13. What is Path Analysis / Testing?
There are many published techniques for conducting path analysis and path testing, also
called white box testing. This type of analysis is systematic and quantifiable.
18. What is the difference between Quality Assurance and Quality Control?
19. Why is it often hard for management to get serious about quality assurance?
Solving problems is a high-visibility process; preventing problems is low-visibility.
However, quality is obviously a subjective term. It will depend on who the 'customer' is
and their overall influence in the scheme of things. A wide-angle view of the 'customers'
of a software development project might include end-users, customer acceptance testers,
customer contract officers, customer management, the development organization's
management/accountants/testers/salespeople, future software maintenance engineers,
stockholders, magazine columnists, etc. Each type of 'customer' will have their own slant
on 'quality'
- the accounting department might define quality in terms of profits while an end-user
might define quality as user-friendly and bug-free.
SEI
SEI = 'Software Engineering Institute' at Carnegie-Mellon University; initiated by the
U.S. Defense Department to help improve software development processes.
CMM
CMM = 'Capability Maturity Model', developed by the SEI. It's a model of 5 levels of
organizational 'maturity' that determine effectiveness in delivering quality software. It is
geared to large organizations such as large U.S. Defense Department contractors.
However, many of the QA processes involved are appropriate to any organization, and if
reasonably applied can be helpful.
Level 4 - metrics are used to track productivity, processes, and products. Project
performance is predictable, and quality is consistently high.
Level 5 - the focus is on continouous process improvement. The impact of new processes
and technologies can be predicted and effectively implemented when required.
What is ISO?
ISO = 'International Organisation for Standards' - The ISO 9001, 9002, and 9003
standards concern quality systems that are assessed by outside auditors, and they apply to
many kinds of production and manufacturing organizations, not just software. The most
comprehensive is 9001, and this is the one most often used by software development
organizations. It covers documentation, design, development, production, testing,
installation, servicing, and other processes. ISO 9000-3 (not the same as 9003) is a
guideline for applying ISO 9001 to software development organizations. The U.S.
version of the ISO 9000 series standards is exactly the same as the international version,
and is called the ANSI/ASQ Q9000 series. The U.S. version can be purchased directly
from the ASQ (American Society for Quality) or the ANSI organizations. To be ISO 9001
certified, a third-party auditor assesses an organization, and certification is typically good
for about 3 years, after which a complete reassessment is required. Note that ISO 9000
certification does not necessarily indicate quality products – it indicates only that
documented processes are followed.
What is IEEE?
IEEE = 'Institute of Electrical and Electronics Engineers' - among other things, creates
standards such as 'IEEE Standard for Software Test Documentation' (IEEE/ANSI
Standard 829), 'IEEE Standard of Software Unit Testing (IEEE/ANSI Standard 1008),
'IEEE Standard for Software Quality Assurance Plans' (IEEE/ANSI Standard 730), and
others.
What is ANSI?
ANSI = 'American National Standards Institute', the primary industrial standards body in
the U.S.; publishes some software-related standards in conjunction with the IEEE and
ASQ (American Society for Quality).
Certifying agencies?
Other software development process assessment methods besides CMM and ISO 9000
include SPICE, Trillium, TickIT. and Bootstrap. – These are certifying agencies.
31. What is the 'software life cycle'?
The life cycle begins when an application is first conceived and ends when it is no longer
in use. It includes aspects such as initial concept, requirements analysis, functional
design, internal design, documentation planning, test planning, coding, document
preparation, integration, testing, maintenance, updates, retesting, phase-out, and other
aspects.
coverage analyzers - these tools check which parts of the code have been exercised by a
test, and may be oriented to code statement coverage, condition coverage, path coverage,
etc.
load/performance test tools - for testing client/server and web applications under various
load levels.
web test tools - to check that links are valid, HTML code usage is correct, client-side and
server-side programs work, a web site's interactions are secure.
other tools - for test case management, documentation management, bug reporting, and
configuration management.
38. What steps are needed to develop and run software tests?
The following are some of the steps to consider:
• Obtain requirements, functional design, and internal design specifications and other
necessary documents
• Obtain budget and schedule requirements
• Determine project-related personnel and their responsibilities, reporting requirements,
required standards and processes (such as release processes, change processes, etc.)
• Identify application's higher-risk aspects, set priorities, and determine scope and
limitations of tests
• Determine test approaches and methods - unit, integration, functional, system, load,
usability tests, etc.
• Determine test environment requirements (hardware, software, communications, etc.)
• Determine testware requirements (record/playback tools, coverage analyzers, test
tracking, problem/bug tracking, etc.)
• Determine test input data requirements
• Identify tasks, those responsible for tasks, and labor requirements
• Set schedule estimates, timelines, milestones
• Determine input equivalence classes, boundary value analyses, error classes
• Prepare test plan document and have needed reviews/approvals
• Write test cases
• Have needed reviews/inspections/approvals of test cases
• Prepare test environment and testware, obtain needed user manuals/reference
documents/configuration guides/installation guides, set up test tracking processes, set
up logging and archiving processes, set up or obtain test input data
• Obtain and install software releases
• Perform tests
• Evaluate and report results
• Track problems/bugs and fixes
• Retest as needed
• Maintain and update test plans, test cases, test environment, and testware through life
cycle
• Title
• Identification of software including version/release numbers
• Revision history of document including authors, dates, approvals
• Table of Contents
• Purpose of document, intended audience
• Objective of testing effort
• Software product overview
• Relevant related document list, such as requirements, design documents, other test
plans, etc.
• Relevant standards or legal requirements
• Traceability requirements
• Relevant naming conventions and identifier conventions
• Overall software project organization and personnel/contact-info/responsibilities
• Test organization and personnel/contact-info/responsibilities
• Assumptions and dependencies
• Project risk analysis
• Testing priorities and focus
• Scope and limitations of testing
• Test outline - a decomposition of the test approach by test type, feature, functionality,
• process, system, module, etc. as applicable
• Outline of data input equivalence classes, boundary value analysis, error classes
• Test environment - hardware, operating systems, other required software, data
configurations,
• interfaces to other systems
• Test environment setup and configuration issues
• Test data setup requirements
• Database setup requirements
• Outline of system-logging/error-logging/other capabilities, and tools such as screen
capture
• software, that will be used to help describe and report bugs
• Discussion of any specialized software or hardware tools that will be used by testers
to help
• track the cause or source of bugs
• Test automation - justification and overview
• Test tools to be used, including versions, patches, etc.
• Test script/test code maintenance processes and version control
• Problem tracking and resolution - tools and processes
• Project test metrics to be used
• Reporting requirements and testing deliverables
• Software entrance and exit criteria
• Initial sanity testing period and criteria
• Test suspension and restart criteria
• Personnel allocation
• Personnel pre-training needs
• Test site/location
• Outside test organizations to be utilized and their purpose, responsibilties,
deliverables,
• contact persons, and coordination issues
• Relevant proprietary, classified, security, and licensing issues.
• Open issues
• Appendix - glossary, acronyms, etc.
Complete information such that developers can understand the bug, get an idea of it's
severity, and reproduce it if necessary.
• Bug identifier (number, ID, etc.)
• Current bug status (e.g., 'Released for Retest', 'New', etc.)
• The application name or identifier and version
• The function, module, feature, object, screen, etc. where the bug occurred
• Environment specifics, system, platform, relevant hardware specifics
• Test case name/number/identifier
• One-line bug description
• Full bug description
• Description of steps needed to reproduce the bug if not covered by a test case or if the
developer doesn't have easy access to the test case/test script/test tool
• Names and/or descriptions of file/data/messages/etc. used in test
• File excerpts/error messages/log file excerpts/screen shots/test tool logs that would be
helpful in finding the cause of the problem
• Severity estimate (a 5-level range such as 1-5 or 'critical'-to-'low' is common)
• Was the bug reproducible?
• Tester name
• Test date
• Bug reporting date
• Name of developer/group/organization the problem is assigned to
• Description of problem cause
• Description of fix
• Code section/file/module/class/method that was fixed
• Date of fix
• Application version that contains the fix
• Tester responsible for retest
• Retest date
• Retest results
• Regression testing requirements
• Tester responsible for regression tests
• Regression testing results
46. What if the project isn't big enough to justify extensive testing?
Consider the impact of project errors, not the size of the project. However, if extensive
testing is still not justified, risk analysis is again needed and the same considerations as
described previously in 'What if there isn't enough time for thorough testing?' apply. The
tester might then do ad hoc testing, or write up a limited test plan based on the risk
analysis.
48. What if the application has functionality that wasn't in the requirements?
It may take serious effort to determine if an application has significant unexpected or
hidden functionality, and it would indicate deeper problems in the software development
process. If the functionality isn't necessary to the purpose of the application, it should be
removed, as it may have unknown impacts or dependencies that were not taken into
account by the designer or the customer. If not removed, design information will be
needed to determine added testing needs or regression testing needs. Management should
be made aware of any significant added risks as a result of the unexpected functionality.
If the functionality only effects areas such as minor improvements in the user interface,
for example, it may not be a significant risk.
Testing Objectives
Testing is a process of executing a program with the intent of finding an error. A good test
is one that has a high probability of finding an as yet undiscovered error. A successful test
is one that uncovers an as yet undiscovered error.
The objective is to design tests that systematically uncover different classes of errors and
do so with a minimum amount of time and effort.
Why do white box testing when black box testing is used to test conformance to
requirements?
Logic errors and incorrect assumptions most likely to be made when coding for "special
cases". Need to ensure these execution paths are tested.
May find assumptions about execution paths incorrect, and so make design errors. White
box testing can find these errors.
Typographical errors are random. Just as likely to be on an obscure logical path as on a
mainstream path.
"Bugs lurk in corners and congregate at boundaries"
Test cases which exercise basic set will execute every statement at least once.
Cyclomatic Complexity
Note: some paths may only be able to be executed as part of another test.
Conditions Testing
Condition testing aims to exercise all logical conditions in a program module.
Can define:
Relational expression: (E1 op E2), where E1 and E2 are arithmetic expressions.
Simple condition: Boolean variable or relational expression, possibly preceded by a NOT
operator.
Compound condition: composed of two or more simple conditions, boolean operators
and
parentheses.
Boolean expression: Condition without relational expressions.
Domain Testing - uses three or four tests for every relational operator.
Example 1: C1 = B1 & B2
Selects test paths according to the location of definitions and use of variables.
Examples:
To test:
Attempts to find:
Divide the input domain into classes of data for which test cases can be generated.
An input condition is either a specific numeric value, range of values, a set of related
values, or a
boolean condition.
If an input condition specifies a range or a specific value, one valid and two invalid
equivalence classes defined.
If an input condition specifies a boolean or a member of a set, one valid and one
invalid
equivalence classes defined.
Test cases for each input domain data item developed and executed.
Examples:
1.For a range of values bounded by a and b, test (a-1), a, (a+1), (b-1), b, (b+1).
2.If input conditions specify a number of values n, test with (n-1), n and (n+1) input
values.
3.Apply 1 and 2 to output conditions (e.g., generate table of minimum and maximum
size).
4.If internal program data structures have boundaries (e.g., buffer size, table limits), use
input
data to exercise structures on boundaries.
1.5.3 Cause Effect Graphing Techniques.
Executive Order 10358 provides in the case of an employee whose work week varies
from the
normal Monday through Friday work week, that Labor Day and Thanksgiving Day each
were
to be observed on the next succeeding workday when the holiday fell on a day outside the
employee's regular basic work week. Now, when Labor Day, Thanksgiving Day or any of
the
new Monday holidays are outside an employee's basic workbook, the immediately
preceding
workday will be his holiday when the non-workday on which the holiday falls is the
second
non-workday or the non-workday designated as the employee's day off in lieu of
Saturday.
When the non-workday on which the holiday falls is the first non-workday or the
non-workday designated as the employee's day off in lieu of Sunday, the holiday
observance is
moved to the next succeeding workday.
1.Causes (input conditions) and effects (actions) are listed for a module and an
identifier is
assigned to each.
2.A cause-effect graph developed.
3.Graph converted to a decision table.
4.Decision table rules are converted to test cases.
Simplified symbology:
For redundant s/w, use separate teams to develop independent versions of the software.
Test each version with same test data to ensure all provide identical output.
Even if will only run one version in final system, for some critical applications can
develop
independent versions and use comparison testing or back-to-back testing.
If the programming language semantics are formally defined, can consider program to be
a set of
mathematical statements
Can attempt to develop a mathematical proof that the program is correct with respect to
the
specification.
If the proof can be established, the program is verified and testing to check verification is
not
required.
There are a number of approaches to proving program correctness. Will only consider
axiomatic
approach.
Suppose that at points P(1), .. , P(n) assertions concerning the program variables and their
relationships can be made.
The assertion a(1) is about inputs to the program, and a(n) about outputs.
Can now attempt, for k between 1 and (n-1), to prove that the statements between
Given that a(1) and a(n) are true, this sequence of proofs shows partial program
correctness. If it
can be shown that the program will terminate, the proof is complete.
Static analysis tools scan the source code to try to detect errors.
Can check:
1.Syntax.
2.Unreachable code
3.Unconditional branches into loops
4.Undeclared variables
5.Uninitialised variables.
6.Parameter type mismatches
7.Uncalled functions and procedures.
8.Variables used before initialisation.
9.Non usage of function results.
10.Possible array bound errors.
11.Misuse of pointers.
1.Static analyser
2.Code Auditors
3.Assertion processors
4.Test file generators
5.Test Data Generators
6.Test Verifiers
7.Output comparators.