Software QA and Testing Frequently-Asked-Questions
Software QA and Testing Frequently-Asked-Questions
Software QA and Testing Frequently-Asked-Questions
3.What are some recent major computer system failures caused by software bugs?
In April of 2003 it was announced that the largest student loan company in the U.S.
made a software error in calculating the monthly payments on 800,000 loans.
Although borrowers were to be notified of an increase in their required payments, the
company will still reportedly lose $8 million in interest. The error was uncovered
when borrowers began reporting inconsistencies in their bills.
News reports in February of 2003 revealed that the U.S. Treasury Department mailed
50,000 Social Security checks without any beneficiary names. A spokesperson
indicated that the missing names were due to an error in a software change.
Replacement checks were subsequently mailed out with the problem corrected, and
recipients were then able to cash their Social Security checks.
In March of 2002 it was reported that software bugs in Britain's national tax system
resulted in more than 100,000 erroneous tax overcharges. The problem was partly
attibuted to the difficulty of testing the integration of multiple systems.
A newspaper columnist reported in July 2001 that a serious flaw was found in off-
the-shelf software that had long been used in systems for tracking certain U.S.
nuclear materials. The same software had been recently donated to another country
to be used in tracking their own nuclear materials, and it was not until scientists in
that country discovered the problem, and shared the information, that U.S. officials
became aware of the problems. According to newspaper stories in mid-2001, a major
systems development contractor was fired and sued over problems with a large
retirement plan management system. According to the reports, the client claimed
that system deliveries were late, the software had excessive defects, and it caused
other systems to crash.
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.News reports in
September of 2000 told of a software vendor settling a lawsuit with a large mortgage
lender; the vendor had reportedly delivered an online mortgage processing system
that did not meet specifications, was delivered late, and didn't work.
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 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.
A small town in Illinois received an unusually large monthly electric bill of $7 million
in March of 1999. This was about
700 times larger than its normal bill. It turned out to be due to bugs in new software
that had been purchased by the local power company to deal with Y2K software
issues.
4.Why is it often hard for management to get serious about quality assurance?
'no problem'
'piece of cake'
'I can whip that out in a few hours'
'it should be easy to update that old code'
Instead of:
'that adds a lot of complexity and we could end up making a lot of mistakes'
'we have no idea if we can do that; we'll wing it'
'I can't estimate how long it will take, until I
take a close look at it'
'we can't figure out what that old spaghetti code did in the first place'
If there are too many unrealistic 'no problem's', the result is bugs.
Poorly documented code - it's tough to maintain and modify code that is badly
written or poorly documented; the result is bugs. In many organizations
management provides no incentive for programmers to document their code or write
clear, understandable code. In fact, it's usually the opposite: they get points mostly
for quickly turning out code, and there's job security if nobody else can understand it
('if it was hard to write, it should be hard to read').
Software development tools - visual tools, class libraries, compilers, scripting
tools, etc. often introduce their own bugs or are poorly documented, resulting in
added bugs .
A lot depends on the size of the organization and the risks involved. For large
organizations with high-risk (in terms of lives or property) projects, serious
management buy-in is required and a formalized QA process is necessary.
For small groups or projects, a more ad-hoc process may be appropriate, depending
on the type of customers and projects. A lot will depend on team leads or managers,
feedback to developers, and ensuring adequate communications among customers,
managers, developers, and testers.
In all cases the most value for effort will be in requirements management processes,
with a goal of clear, complete, testable requirement specifications or expectations .
8.What is a 'walkthrough'?
9.What's an 'inspection'?
Black box testing - not based on any knowledge of internal design or code. Tests
are based on requirements and functionality.
Unit testing - the most 'micro' scale of testing; to test particular functions or code
modules. Typically done by the
programmer and not by testers, as it requires detailed knowledge of the internal
program design and code. Not always easily done unless the application has a well-
designed architecture with tight code; may require developing test driver modules or
test harnesses.
End-to-end testing - similar to system testing; the 'macro' end of the test scale;
involves testing of a complete application environment in a situation that mimics
real-world use, such as interacting with a database, using network communications,
or interacting with other hardware, applications, or systems if appropriate.
Stress testing - term often used interchangeably with 'load' and 'performance'
testing. Also used to describe such tests as system functional testing while under
unusually heavy loads, heavy repetition of certain actions or inputs, input of large
numerical values, large complex queries to a database system, etc.
Performance testing - term often used interchangeably with 'stress' and 'load'
testing. Ideally 'performance' testing (and any other 'type' of testing) is defined in
requirements documentation or QA or Test Plans.
Usability testing - testing for 'user-friendliness'. Clearly this is subjective, and will
depend on the targeted end-user or customer. User interviews, surveys, video
recording of user sessions, and other techniques can be used. Programmers and
testers are usually not appropriate as usability testers.
Recovery testing - testing how well a system recovers from crashes, hardware
failures, or other catastrophic problems.
Security testing - testing how well the system protects against unauthorized
internal or external access, willful damage, etc; may require sophisticated testing
techniques.
Exploratory testing - often taken to mean a creative, informal software test that is
not based on formal test plans or test cases; testers may be learning the software as
they test it.
Ad-hoc testing - similar to exploratory testing, but often taken to mean that the
testers have significant understanding of the software before testing it.
Mutation testing - a method for determining if a set of test data or test cases is
useful, by deliberately introducing various code changes ('bugs') and retesting with
the original test data/cases to determine if the 'bugs' are detected. Proper
implementation requires large computational resources .
Unrealistic schedule - if too much work is crammed in too little time, problems are
inevitable.
Inadequate testing - no one will know whether or not the program is any good
until the customer complains or systems crash.
Adequate testing - start testing early on, re-test after fixes or changes, plan for
adequate time for testing and bug-fixing.
Quality software is reasonably bug-free, delivered on time and within budget, meets
requirements and/or expectations, and is maintainable. 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. (See
the Bookstore section's 'Software QA' category for useful books with more
information.)
'Good code' is code that works, is bug free, and is readable and maintainable. Some
organizations have coding 'standards' that all developers are supposed to adhere to,
but everyone has different ideas about what's best, or what is too many or too few
rules. There are also various theories and metrics, such as McCabe Complexity
metrics. It should be kept in mind that excessive use of standards and rules can stifle
productivity and creativity. 'Peer reviews', 'buddy checks' code analysis tools, etc.
can be used to check for problems and enforce standards. For C and C++ coding,
here are some typical ideas to consider in setting rules/standards; these may or may
not apply to a particular situation:
Use descriptive function and method names - use both upper and lower case, avoid
abbreviations, use as many characters as necessary to be adequately descriptive
(use of more than 20 characters is not out of line); be consistent in naming
conventions.
Use descriptive variable names - use both upper and lower case, avoid abbreviations,
use as many characters as necessary to be adequately descriptive (use of more than
20 characters is not out of line); be consistent in naming conventions.
Function and method sizes should be minimized; less than 100 lines of code is good,
less than 50 lines is preferable.
In adding comments, err on the side of too many rather than too few comments; a
common rule of thumb is that there should be at least as many lines of comments
(including header blocks) as lines of code.
Make extensive use of error handling procedures and status and error logging.
For C++, to minimize complexity and increase maintainability, avoid too many levels
of inheritance in class heirarchies
(relative to the size and complexity of the application). Minimize use of multiple
inheritance, and minimize use of operator overloading (note that the Java
programming language eliminates multiple inheritance and operator overloading.)
Cor C++, keep class methods small, less than 50 lines of code per method is
preferable.For C++, make liberal use of exception handlers
'Design' could refer to many things, but often refers to 'functional design' or 'internal
design'. Good internal design is
indicated by software code whose overall structure is clear, understandable, easily
modifiable, and maintainable; is robust with sufficient error-handling and status
logging capability; and works correctly when implemented. Good functional design is
indicated by an application whose functionality can be traced back to customer and
end-user requirements. (See further discussion of functional and internal design in
'What's the big deal about requirements?' in FAQ #2.) For programs that have a user
interface, it's often a good idea to assume that the end user will have little computer
knowledge and may not read a user manual or even the on-line help; some common
rules-of-thumb
include:
The program should act in a way that least surprises the user
It should always be evident to the user what can be done next and how to exit
The program shouldn't let the users do something stupid without warning them.
Level 4 - metrics are used to track productivity, processes, and products. Project
performance is predictable, and quality is consistently high.
Other software development process assessment methods besides CMM and ISO
9000 include SPICE, Trillium, TickIT. and Bootstrap. See the 'Other Resources' section
for further information available on the web.
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. (See the Bookstore section's 'Software QA', 'Software
Engineering', and 'Project Management' categories for
useful books with more information.)
Possibly. For small projects, the time needed to learn and implement them may not
be worth it. For larger projects, or on- going long-term projects they can be valuable.
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.Memory analyzers - such as bounds-checkers and leak
detectors .
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.
A good test engineer has a 'test to break' attitude, an ability to take the point of view
of the customer, a strong desire for quality, and an attention to detail. Tact and
diplomacy are useful in maintaining a cooperative relationship with developers, and
an ability to communicate with both technical (developers) and non-technical
(customers, management) people is useful. Previous software development
experience can be helpful as it provides a deeper understanding of the software
development process, gives the tester an appreciation for the developers' point of
view, and reduce the learning curve in automated test tool programming. Judgement
skills are needed to assess high-risk areas of an application on which to focus testing
efforts when time is limited.
The same qualities a good tester has are useful for a QA engineer. Additionally, they
must be able to understand the entire software development process and how it can
fit into the business approach and goals of the organization. Communication skills
and the ability to understand various sides of issues are important. In organizations
in the early stages of implementing QA processes, patience and diplomacy are
especially needed. An ability to find problems as well as to see 'what's missing' is
important for inspections and reviews.
>Be able to maintain enthusiasm of their team and promote a positive atmosphere,
despite what is a somewhat 'negative' process (e.g., looking for or preventing
problems)
> Have the ability to withstand pressures and say 'no' to other managers when
quality is insufficient or QA processes are not being adhered to
>Have people judgement skills for hiring and keeping skilled personnel
Obtain requirements, functional design, and internal design specifications and other
necessary documents
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.
Perform tests
Maintain and update test plans, test cases, test environment, and testware through
life cycle
A software project test plan is a document that describes the objectives, scope,
approach, and focus of a software testing effort. The process of preparing a test plan
is a useful way to think through the efforts needed to validate the acceptability of a
software product. The completed document will help people outside the test group
understand the 'why' and 'how' of product validation. It should be thorough enough
to be useful but not so thorough that no one outside the test group will read it. The
following are some of the items that might be included in a test plan, depending on
the particular project:
Title
Table of Contents
Relevant related document list, such as requirements, design documents, other test
plans, etc.
Traceability requirements
Outline of data input equivalence classes, boundary value analysis, error classes
Test environment validity analysis - differences between the test and production
systems and their impact on test validity.
Discussion of any specialized software or hardware tools that will be used by testers
to help track the cause or source of bugs
A test case is a document that describes an input, action, or event and an expected
response, to determine if a feature of an application is working correctly. A test case
should contain particulars such as test case identifier, test case name, objective, test
conditions/setup, input data requirements, steps, and expected results.
Note that the process of developing test cases can help find problems in the
requirements or design of an application, since it requires completely thinking
through the operation of the application. For this reason, it's useful to prepare test
cases early in the development cycle if possible.
The bug needs to be communicated and assigned to developers that can fix it. After
the problem is resolved, fixes should be re-tested, and determinations made
regarding requirements for regression testing to check that fixes didn't create
problems elsewhere. If a problem- tracking system is in place, it should encapsulate
these processes. A variety of commercial problem-tracking/management software
tools are available (see the 'Tools' section for web resources with listings of such
tools). The following are items to consider in the tracking process:
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
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
The best bet in this situation is for the testers to go through the process of reporting
whatever bugs or blocking-type problems initially show up, with the focus being on
critical bugs. Since this type of problem can severely affect schedules, and indicates
deeper problems in the software development process (such as insufficient unit
testing or insufficient integration testing, poor design, improper build or release
procedures, etc.) managers should be notified, and provided with some
documentation as evidence of the problem.
Deadlines (release deadlines, testing deadlines, etc.) Test cases completed with
certain percentage passed
Test budget depleted Coverage of code/functionality/requirements reaches a
specified point Bug rate falls below a certain level Beta or alpha testing period ends
Use risk analysis to determine where testing should be focused. Since it's rarely
possible to test every possible aspect of an application, every possible combination of
events, every dependency, or everything that could go wrong, risk analysis is
appropriate to most software development projects. This requires judgement skills,
common sense, and experience. (If warranted, formal methods are also available.)
Considerations can include:
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.
Work with the project's stakeholders early on to understand how requirements might
change so that alternate test plans and strategies can be worked out in advance, if
possible.
It's helpful if the application's initial design allows for some adaptability so that later
changes do not require redoing the
application from scratch.
If the code is well-commented and well-documented this makes changes easier for
the developers.
Use rapid prototyping whenever possible to help customers feel sure of their
requirements and minimize changes.
The project's initial schedule should allow for some extra time commensurate with
the possibility of changes.
Try to move new requirements to a 'Phase 2' version of an application, while using
the original requirements for the 'Phase 1' version.
Negotiate to allow only easily-implemented new requirements into the project, while
moving more difficult new requirements into future versions of the application.
Focus initial automated testing on application aspects that are most likely to remain
unchanged.
Design some flexibility into test cases (this is not easily done; the best bet might be
to minimize the detail in the test cases, or set up only higher-level generic-type test
plans)
Focus less on detailed test plans and test cases and more on ad hoc testing (with an
understanding of the added risk that this entails).
31. What if the application has functionality that wasn't in the requirements?
Everyone in the organization should be clear on what 'quality' means to the customer
Web sites are essentially client/server applications - with web servers and 'browser'
clients. Consideration should be given to the interactions between html pages,
TCP/IP communications, Internet connections, firewalls, applications that run in web
pages (such as applets, javascript, plug-in applications), and applications that run on
the server side (such as cgi scripts, database interfaces, logging applications,
dynamic page generators, asp, etc.). Additionally, there are a wide variety of servers
and browsers, various versions of each, small but sometimes significant differences
between them, variations in connection speeds, rapidly changing technologies, and
multiple standards and protocols. The end result is that testing for web sites can
become a major ongoing effort. Other considerations might include:
What are the expected loads on the server (e.g., number of hits per unit time?), and
what kind of performance is required under such loads (such as web server response
time, database query response times). What kinds of tools will be needed for
performance testing (such as web load testing tools, other tools already in house
that can be adapted, web robot downloading tools, etc.)?
Who is the target audience? What kind of browsers will they be using? What kind of
connection speeds will they by using? Are they intra- organization (thus with likely
high connection speeds and similar browsers) or Internet-wide (thus with a wide
variety of connection speeds and browser types)?
What kind of performance is expected on the client side (e.g., how fast should pages
appear, how fast should animations, applets, etc. load and run)?
Will down time for server and content maintenance/upgrades be allowed? how
much?
What kinds of security (firewalls, encryptions, passwords, etc.) will be required and
what is it expected to do? How can it be tested?
How reliable are the site's Internet connections required to be?
And how does that affect backup system or redundant connection requirements and
testing?
What processes will be required to manage updates to the web site's content, and
what are the requirements for maintaining, tracking, and controlling page content,
graphics, links, etc.?
Which HTML specification will be adhered to? How strictly? What variations will be
allowed for targeted browsers?
Will there be any standards or requirements for page appearance and/or graphics
throughout a site or parts of a site??
How will internal and external links be validated and updated? how often?
Can testing be done on the production system, or will a separate test system be
required? How are browser caching,
variations in browser option settings, dial-up connection variabilities, and real-world
internet 'traffic congestion' problems to be accounted for in testing?
How extensive or customized are the server logging and reporting requirements; are
they considered an integral part of the system and do they require testing?
Some usability guidelines to consider - these are subjective and may or may not
apply to a given situation (Note: more information on usability testing issues can be
found in articles about web site usability in the 'Other Resources' section):
Pages should be 3-5 screens max unless content is tightly focused on a single topic.
If larger, provide internal links
within the page.
The page layouts and design elements should be consistent throughout a site, so
that it's clear to the user that they're
still within a site.
All pages should have links external to the page; there should be no dead-end pages.
The page owner, revision date, and a link to a contact person or organization should
be included on each page.
35. How is testing affected by object-oriented designs?
Programmers are expected to write unit and functional test code first - before the
application is developed. Test code is under source control along with the rest of the
code. Customers are expected to be an integral part of the project team and to help
develope scenarios for acceptance/black box testing. Acceptance tests are preferably
automated, and are modified and rerun for each of the frequent development
iterations. QA and test personnel are also required to be an integral part of the
project team. Detailed requirements documentation is not used, and frequent re-
scheduling,
re-estimating, and re-prioritizing is expected. For more info see the XP-related
listings in the Softwareqatest.com 'Other Resources' section.