Software QA and Testing Interview Questions
Software QA and Testing Interview Questions
Software QA and Testing Interview 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 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 national tax system resulted
in more than 100,000 erroneous tax overcharges. The problem was partly attributed
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 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 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 ofCape Canaverallaunches.
The failure was the latest in a string of launch failures, triggering a complete military
and industry review of space launch programs, including software integration and
testing processes. Congressional oversight hearings were requested.
'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').
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.
Beta testing - testing when development and testing are essentially completed and
final bugs and problems need to be found before final release. Typically done by end-
users or others, not by programmers or testers.
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 hierarchies
(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.
16. What is SEI? CMM? ISO? IEEE? ANSI? Will it help?
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. Organizations can receive
CMM ratings by undergoing assessments by qualified auditors.
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.
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. Judgment
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 judgment 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
Evaluate and report results
Retest as needed
Maintain and update test plans, test cases, test environment, and test ware 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 judgment skills,
common sense, and experience. (If warranted, formal methods are also available.)
Considerations can include: