A Self-Teaching Introduction - Software testing
A Self-Teaching Introduction - Software testing
TESTING
LICENSE, DISCLAIMER OF LIABILITY, AND LIMITED
WARRANTY
By purchasing or using this book (the “Work”), you agree that this license grants permission to use the
contents contained herein, but does not give you the right of ownership to any of the textual content in
the book or ownership to any of the information or products contained in it. This license does not
permit uploading of the Work onto the Internet or on a network (of any kind) without the written
consent of the Publisher. Duplication or dissemination of any text, code, simulations, images, etc.
contained herein is limited to and subject to licensing terms for the respective products, and permission
must be obtained from the Publisher or the owner of the content, etc., in order to reproduce or network
any portion of the textual material (in any media) that is contained in the Work.
MERCURY LEARNING AND INFORMATION (“MLI” or “the Publisher”) and anyone involved in
the creation, writing, or production of the companion disc, accompanying algorithms, code, or
computer programs (“the software”), and any accompanying Web site or software of the Work, cannot
and do not warrant the performance or results that might be obtained by using the contents of the Work.
The author, developers, and the Publisher have used their best efforts to insure the accuracy and
functionality of the textual material and/or programs contained in this package; we, however, make no
warranty of any kind, express or implied, regarding the performance of these contents or programs. The
Work is sold “as is” without warranty (except for defective materials used in manufacturing the book or
due to faulty workmanship).
The author, developers, and the publisher of any accompanying content, and anyone involved in the
composition, production, and manufacturing of this work will not be liable for damages of any kind
arising out of the use of (or the inability to use) the algorithms, source code, computer programs, or
textual material contained in this publication. This includes, but is not limited to, loss of revenue or
profit, or other incidental, physical, or consequential damages arising out of the use of this Work.
The sole remedy in the event of a claim of any kind is expressly limited to replacement of the book, and
only at the discretion of the Publisher. The use of “implied warranty” and certain “exclusions” vary
from state to state, and might not apply to the purchaser of this product.
SOFTWARE
TESTING
A Self-Teaching Introduction
Original Title and Copyright: Software Testing, 4/e. © 2014 by S.K. Kataria & Sons.
This publication, portions of it, or any accompanying software may not be reproduced in any way,
stored in a retrieval system of any type, or transmitted by any means, media, electronic display or
mechanical display, including, but not limited to, photocopy, recording, Internet postings, or scanning,
without prior permission in writing from the publisher.
The publisher recognizes and respects all marks used by companies, manufacturers, and developers as a
means to distinguish their products. All brand names and product names mentioned in this book are
trademarks or service marks of their respective companies. Any omission or misuse (of any kind) of
service marks or trademarks, etc. is not an attempt to infringe on the property of others.
Our titles are available for adoption, license, or bulk purchase by institutions, corporations, etc.
For additional information, please contact the Customer Service Dept. at 800-232-0223(toll free).
All of our titles are available in digital format at authorcloudware.com and other digital vendors. The
sole obligation of MERCURY LEARNING AND INFORMATION to the purchaser is to replace the
book, based on defective materials or faulty workmanship, but not based on the operation or
functionality of the product.
CONTENTS
Index
CHAPTER
1
INTRODUCTION TO SOFTWARE
TESTING
Inside this Chapter:
1.0. Introduction
1.1. The Testing Process
1.2. What is Software Testing?
1.3. Why Should We Test? What is the Purpose?
1.4. Who Should Do Testing?
1.5. What Should We Test?
1.6. Selection of Good Test Cases
1.7. Measurement of the Progress of Testing
1.8. Incremental Testing Approach
1.9. Basic Terminology Related to Software Testing
1.10. Testing Life Cycle
1.11. When to Stop Testing?
1.12. Principles of Testing
1.13. Limitations of Testing
1.14. Available Testing Tools, Techniques, and Metrics
1.0. INTRODUCTION
Testing is the process of executing the program with the intent of
finding faults. Who should do this testing and when should it start are
very important questions that are answered in this text. As we know
software testing is the fourth phase of the software development life
cycle (SDLC). About 70% of development time is spent on testing.
We explore this and many other interesting concepts in this chapter.
1.1. THE TESTING PROCESS
Testing is different from debugging. Removing errors from your
programs is known as debugging but testing aims to locate as yet
undiscovered errors. We test our programs with both valid and invalid
inputs and then compare our expected outputs as well as the observed
outputs (after execution of software). Please note that testing starts
from the requirements analysis phase only and goes until the last
maintenance phase. During requirement analysis and designing we do
static testing wherein the SRS is tested to check whether it is as per
user requirements or not. We use techniques of code reviews, code
inspections, walkthroughs, and software technical reviews (STRs) to
do static testing. Dynamic testing starts when the code is ready or even
a unit (or module) is ready. It is dynamic testing as now the code is
tested. We use various techniques for dynamic testing like black-box,
gray-box, and white-box testing. We will be studying these in the
subsequent chapters.
OR
“Software testing is the process of executing a program or
system with the intent of finding errors.”
[Myers]
OR
“It involves any activity aimed at evaluating an attribute or
capability of a program or system and determining that it meets
its required results.”
[Hetzel]
Testing is NOT:
a. The process of demonstrating that errors are not present.
b. The process of showing that a program performs its intended
functions correctly.
c. The process of establishing confidence that a program does
what it is supposed to do.
So, all these definitions are incorrect. Because, with these as
guidelines, one would tend to operate the system in a normal manner
to see if it works. One would unconsciously choose such
normal/correct test data as would prevent the system from failing.
Besides, it is not possible to certify that a system has no errors—
simply because it is almost impossible to detect all errors.
So, simply stated: “Testing is basically a task of locating errors.”
It may be:
a. Positive testing: Operate the application as it should be
operated. Does it behave normally? Use a proper variety of
legal test data, including data values at the boundaries to test if
it fails. Check actual test results with the expected. Are results
correct? Does the application function correctly?
b. Negative testing: Test for abnormal operations. Does the
system fail/crash? Test with illegal or abnormal data.
Intentionally attempt to make things go wrong and to
discover/detect—“Does the program do what it should not do?
Does it fail to do what it should?”
c. Positive view of negative testing: The job of testing is to
discover errors before the user does. A good tester is one who
is successful in making the system fail. Mentality of the tester
has to be destructive—opposite to that of the creator/author,
which should be constructive.
One very popular equation of software testing is:
Software Testing = Software Verification + Software
Validation
Why it happened?
= 1 + 3 + (3 × 3) + (3 × 3 × 3) + ...
= 1 + Σ3n
(where n > 0)
NOTE
NOTE
To see some of the most popular testing tools of 2017, visit the
following site: https://www.guru99.com/testing-tools.html
SUMMARY
1. Software testing is an art. Most of the testing methods and
practices are not very different from 20 years ago. It is
nowhere near maturity, although there are many tools and
techniques available to use. Good testing also requires a
tester’s creativity, experience, and intuition, together with
proper techniques.
2. Testing is more than just debugging. It is not only used to
locate errors and correct them. It is also used in validation,
verification process, and reliability measurement.
3. Testing is expensive. Automation is a good way to cut down
cost and time. Testing efficiency and effectiveness is the
criteria for coverage based testing techniques.
4. Complete testing is infeasible. Complexity is the root of the
problem.
5. Testing may not be the most effective method to improve
software quality.
ANSWERS
1. b.
2. c.
3. c.
4. a.
5. d.
6. b.
7. d.
8. b.
9. a.
10. d.
FIGURE 1.4
FIGURE 1.5
2.0. INTRODUCTION
Software that satisfies its user expectations is a necessary goal of a
successful software development organization. To achieve this goal,
software engineering practices must be applied throughout the
evolution of the software product. Most of these practices attempt to
create and modify software in a manner that maximizes the probability
of satisfying its user expectations.
2.1. DIFFERENCES BETWEEN VERIFICATION AND
VALIDATION
Software verification and validation (V&V) is a technical discipline of
systems engineering. According to Stauffer and Fuji (1986), software
V&V is “a systems engineering process employing a rigorous
methodology for evaluating the correctness and quality of software
product through the software life cycle.”
According to Dr. Berry Boehm (1981), software V&V is
performed in parallel with the software development and not at the
conclusion of the software development. However, verification and
validation are different. Table shows the differences between them.
Verification Validation
1. It is a static process of verifying 1. It is a dynamic process of
documents, design, and code. validating/testing the actual
product.
2. It does not involve executing the 2. It involves executing the code.
code.
3. It is human based checking of 3. It is the computer-based
documents/files. execution of program.
4. Target is requirements 4. Target is actual product—a unit, a
specification, application module, a set of integrated
architecture, high level and modules, and the final product.
detailed design, and database
design.
5. It uses methods like inspections, 5. It uses methods like black-box,
walk throughs, desk-checking, gray-box, and white-box testing.
etc.
6. It, generally, comes first—before 6. It generally follows verification.
validation.
7. It answers the question—Are we 7. It answers the question—Are we
building the product right? building the right product?
8. It can catch errors that validation 8. It can catch errors that
cannot catch. verification cannot catch.
1. Theoretical Foundations
Howden claims the most important theoretical result in program
testing and analysis is that no general purpose testing or analysis
procedure can be used to prove program correctness.
Interface Analysis
It is the detailed examination of the interface requirements
specifications. The evaluation criteria is the same as that for
requirements specification. The main focus is on the interfaces
between software, hardware, user, and external software.
Criticality Analysis
Criticality is assigned to each software requirement. When
requirements are combined into functions, the combined criticality of
requirements form the criticality for the aggregate function. Criticality
analysis is updated periodically as requirement changes are
introduced. This is because such changes can cause an increase or
decrease in a functions criticality which depends on how the revised
requirement impacts system criticality.
Criticality analysis is a method used to locate and reduce high-risk
problems and is performed at the beginning of the project. It identifies
the functions and modules that are required to implement critical
program functions or quality requirements like safety, security, etc.
NOTE
Step 7: Assessment
It is important that the software V&V plan provide for the ability to
collect data that can be used to assess both the product and the
techniques used to develop it. This involves careful collection of error
and failure data, as well as analysis and classification of these data.
Summary:
i. Complexity of software development and maintenance
processes.
ii. Error frequencies for software work products.
iii. Error distribution throughout development phases.
iv. Increasing costs for error removal throughout the life cycle.
Summary:
i. Exhaustive testing is impossible.
ii. Intermediate software products are largely untestable.
c. Reviews are a Form of Testing: The degree of formalism,
scheduling, and generally positive attitude afforded to testing must
exist for software technical reviews if quality products are to be
produced.
Summary:
i. Objectives
ii. Human based versus machine based
iii. Attitudes and norms
d. Reviews are a Way of Tracking a Project: Through
identification of deliverables with well defined entry and exit
criteria and successful review of these deliverables, progress on a
project can be followed and managed more easily [Fagan]. In
essence, review processes provide milestones with teeth. This
tracking is very beneficial for both project management and
customers.
Summary:
i. Individual developer tracking
ii. Management tracking
iii. Customer tracking
e. Reviews Provide Feedback: The instructor should discuss and
provide examples about the value of review processes for
providing feedback about software and its development process.
Summary:
i. Product
ii. Process
f. Educational Aspects of Reviews: It includes benefits like a better
understanding of the software by the review participants that can be
obtained by reading the documentation as well as the opportunity
of acquiring additional technical skills by observing the work of
others.
Summary:
i. Project understanding
ii. Technical skills
Test Plan
1. Test-plan Identifier: Specifies the unique identifier assigned to the
test plan.
2. Introduction: Summarizes the software items and features to be
tested, provides references to the documents relevant for testing
(for example, overall project plan, quality assurance plan,
configuration management plan, applicable standards, etc.).
3. Test Items: Identifies the items to be tested including their
version/revision level, provides references to the relevant item
documentation (for example, requirements specification, design
specification, user’s guide, operations guide, installation guide,
etc.), and identifies items which are specifically excluded from
testing.
4. Features to be Tested: Identifies all software features and their
combinations to be tested, identifies the test-design specification
associated with each feature and each combination of features.
5. Features not to be Tested: Identifies all features and significant
combinations of features which will not be tested, and the reasons
for this.
6. Approach: Describes the overall approach to testing (the testing
activities and techniques applied, the testing of non functional
requirements such as performance and security, the tools used in
testing); specifies completion criteria (for example, error
frequency or code coverage); identifies significant constraints
such as testing-resource availability and strict deadlines; serves
for estimating the testing efforts.
7. Item Pass/Fail Criteria: Specifies the criteria to be used to
determine whether each test item has passed or failed testing.
8. Suspension Criteria and Resumption: Specifies the criteria used to
suspend all or a portion of the testing activity on the test items
(for example, at the end of working day, due to hardware failure
or other external exception, etc.), specifies the testing activities
which must be repeated when testing is resumed.
9. Test Deliverables: Identifies the deliverable documents, typically
test-design specifications, test-case specifications, test-procedure
specifications, test-item transmittal reports, test logs, test-incident
reports, description of test-input data and test-output data, and
description of test tools.
10. Testing Tasks: Identifies the set of tasks necessary to prepare and
perform testing (for example, description of the main phases in
the testing process, design of verification mechanisms, plan for
maintenance of the testing environment, etc.).
11. Environmental Needs: Specifies both the necessary and desired
properties of the test environment (for example, hardware,
communications and systems software, software libraries, test
support tools, level of security for the test facilities, drivers and
stubs to be implemented, office or laboratory space, etc.).
12. Responsibilities: Identifies the groups of persons responsible for
managing, designing, preparing, executing, witnessing, checking,
and resolving the testing process; identifies the groups responsible
for providing the test items (Section 3) and the environmental
needs (Section 11).
13. Staffing and Training Needs: Specifies the number of testers by
skill level, and identifies training options for providing necessary
skills.
14. Schedule: Includes test milestones (those defined in the overall
project plan as well as those identified as internal ones in the
testing process), estimates the time required to do each testing
task, identifies the temporal dependencies between testing tasks,
specifies the schedule over calendar time for each task and
milestone.
15. Risks and Contingencies: Identifies the high-risk assumptions of
the test plan (lack of skilled personnel, possible technical
problems, etc.), specifies contingency plans for each risk (for
example, employment of additional testers, increase of night shift,
exclusion of some tests of minor importance, etc.).
16. Approvals: Specifies the persons who must approve this plan.
Test-Case Specification
1. Test-case Specification Identifier: Specifies the unique identifier
assigned to this test-case specification.
2. Test Items: Identifies and briefly describes the items and features
to be exercised by this test case, supplies references to the
relevant item documentation (for example, requirements
specification, design specification, user’s guide, operations guide,
installation guide, etc.).
3. Input Specifications: Specifies each input required to execute the
test case (by value with tolerance or by name); identifies all
appropriate databases, files, terminal messages, memory resident
areas, and external values passed by the operating system;
specifies all required relationships between inputs (for example,
timing).
4. Output Specifications: Specifies all of the outputs and features
(for example, response time) required of the test items, provides
the exact value (with tolerances where appropriate) for each
required output or feature.
5. Environmental Needs: Specifies the hardware and software
configuration needed to execute this test case, as well as other
requirements (such as specially trained operators or testers).
6. Special Procedural Requirements: Describes any special
constraints on the test procedures which execute this test case (for
example, special set-up, operator intervention, etc.).
7. Intercase Dependencies: Lists the identifiers of test cases which
must be executed prior to this test case, describes the nature of the
dependencies.
Test-Summary Report
1. Test-Summary-Report Identifier: Specifies the unique identifier
assigned to this report.
2. Summary: Summarizes the evaluation of the test items, identifies
the items tested (including their version/revision level), indicates
the environment in which the testing activities took place,
supplies references to the documentation over the testing process
(for example, test plan, test-design specifications, test-procedure
specifications, test-item transmittal reports, test logs, test-incident
reports, etc.).
3. Variances: Reports any variances/deviations of the test items from
their design specifications, indicates any variances of the actual
testing process from the test plan or test procedures, specifies the
reason for each variance.
4. Comprehensiveness Assessment: Evaluates the
comprehensiveness of the actual testing process against the
criteria specified in the test plan, identifies features or feature
combinations which were not sufficiently tested and explains the
reasons for omission.
5. Summary of Results: Summarizes the success of testing (such as
coverage), identifies all resolved and unresolved incidents.
6. Evaluation: Provides an overall evaluation of each test item
including its limitations (based upon the test results and the item-
level pass/fail criteria).
7. Summary of Activities: Summarizes the major testing activities
and events, summarizes resource consumption (for example, total
staffing level, total person-hours, total machine time, and total
elapsed time used for each of the major testing activities).
8. Approvals: Specifies the persons who must approve this report
(and the whole testing phase).
SUMMARY
1. Software engineering technology has matured sufficiently to be
addressed in approved and draft software engineering standards
and guidelines.
2. Business, industries, and government agencies spend billions
annually on computer software for many of their functions:
To manufacture their products.
To provide their services.
To administer their daily activities.
To perform their short- and long-term management functions.
3. As with other products, industries and businesses are discovering
that their increasing dependence on computer technology to
perform these functions, emphasizes the need for safe, secure,
reliable computer systems. They are recognizing that software
quality and reliability are vital to their ability to maintain their
competitiveness and high technology posture in the market place.
Software V&V is one of several methodologies that can be used
for building vital quality software.
ANSWERS
1. a.
2. c.
3. d.
4. a.
5. b.
6. b.
7. c.
8. d.
9. a.
10. d.
REVIEW QUESTIONS
1. a. Discuss briefly the V&V activities during the design phase
of the software development process.
b. Discuss the different forms of IV&V.
2. a. What is the importance of technical reviews in software
development and maintenance life cycle?
b. Briefly discuss how walkthroughs help in technical
reviews.
3. a. Explain why validation is more difficult than verification.
b. Explain validation testing.
4. Explain the following with the help of an example:
‘Verification and Validation.’
5. Write short notes on V&V standards.
6. Write short notes on ‘Independent V&V contractor.’
7. What is an independent test organization? Why is it necessary?
8. Discuss the role of verification and validation in software
evolution. What are verification and validation objective
standards?
9. What is the difference between verification and validation?
10. Discuss V&V approaches, standards, and objectives.
11. What is formal testing?
12. a. What is a software audit?
b. Explain code walkthrough.
13. What are the different V&V activities performed at the coding
phase of the software development process?
14. Discuss in brief software verification and validation plan.
15. a. Why are technical reviews conducted?
b. Discuss a formal method for conducting technical reviews.
16. Discuss one testing technique used during the design phase of
SDLC.
17. Explain all the phases through which we can approach testing
using a sample software testing problem. Comment on
difficulty of testing.
18. Briefly explain code walkthrough and inspection.
19. During code review you detect errors whereas during code
testing you detect failures. Justify.
20. a. What are the testing activities performed during
requirement analysis phase of SDLC.
b. Briefly describe formal proof of correctness.
21. What is a requirements traceability matrix? Give its
importance.
CHAPTER
3
Before we generate the test cases, first we need to give the problem
domain:
Problem Domain: “The triangle program accepts three integers, a, b,
and c, as input. These are taken to be the sides of a triangle. The
integers a, b, and c must satisfy the following conditions:
Please note that we explained above that we can have 13 test cases
(4n + 1) for this problem. But instead of 13, now we have 15 test
cases. Also, test case ID number 8 and 13 are redundant. So, we
ignore them. However, we do not ignore test case ID number 3 as we
must consider at least one test case out of these three. Obviously, it is
mechanical work!
We can say that these 13 test cases are sufficient to test this
program using BVA technique.
Before we generate the test cases for the Next Date function, we must
know the problem domain of this program:
Problem Domain Next Date is a function of three variables: month,
date, and year. It returns the date of next day as output. It reads current
date as input date. The conditions are:
C1: 1 ≤ month ≤ 12
C2: 1 ≤ day ≤ 31
C3: 1900 ≤ year ≤ 2025
If any of conditions C1, C2, or C3 fails, then this function produces
an output “value of month not in the range 1...12.”
Because many combinations of dates exist this function just
displays one message: “Invalid Input Date.”
A very common and popular problem occurs if the year is a leap year.
We have taken into consideration that there are 31 days in a month.
But what happens if a month has 30 days or even 29 or 28 days? A
year is called as a leap year if it is divisible by 4, unless it is a century
year. Century years are leap years only if they are multiples of 400.
So, 1992, 1996, and 2000 are leap years while 1900 is not a leap year.
Furthermore, in this Next Date problem, we find examples of
Zipf’s law also, which states that “80% of the activity occurs in 20%
of the space.” Here also, much of the source-code of the Next Date
function is devoted to the leap year considerations.
In this technique, the input and the output domain is divided into a
finite number of equivalence classes. Then, we select one
representative of each class and test our program against it. It is
assumed by the tester that if one representative from a class is able to
detect error then why should he consider other cases. Furthermore, if
this single representative test case did not detect any error then we
assume that no other test case of this class can detect error. In this
method, we consider both valid and invalid input domains. The system
is still treated as a black-box meaning that we are not bothered about
its internal logic.
The idea of equivalence class testing is to identify test cases by
using one element from each equivalence class. If the equivalence
classes are chosen wisely, the potential redundancy among test cases
can be reduced.
For example, in our triangle problem, we would certainly have a
test case for an equilateral triangle and we might pick the triple (10,
10, 10) as inputs for a test case. If this is so then it is obvious that there
is no sense in testing for inputs like (8, 8, 8) and (100, 100, 100). Our
intuition tells us that these would be “treated the same” as the first test
case. Thus, they would be redundant. The key and the craftsmanship
lies in the choice of the equivalence relation that determines the
classes.
Please note that the expected outputs describe the invalid input
values thoroughly.
3.2.5.2. EQUIVALENCE CLASS TEST CASES FOR NEXT DATE FUNCTION
The actual craft of choosing the test cases lies in this example. Recall
that Next Date is a function of three variables— month (mm), day
(dd), and year (yyyy). Assume that their ranges are
1 ≤ month ≤ 12
1 ≤ day ≤ 31
1812 ≤ year ≤ 2012
So, we get this test case on the basis of valid classes – M1, D1, and
Y1 above.
c. Weak robust test cases are given below:
So, we get 7 test cases based on the valid and invalid classes of the
input domain.
d. Strong robust equivalence class test cases are given below:
d. And finally, the strong robust equivalence class test cases are as
follows:
3.2.6. GUIDELINES FOR EQUIVALENCE CLASS TESTING
The following are guidelines for equivalence class testing:
1. The weak forms of equivalence class testing (normal or robust) are
not as comprehensive as the corresponding strong forms.
2. If the implementation language is strongly typed and invalid values
cause run-time errors then it makes no sense to use the robust form.
3. If error conditions are a high priority, the robust forms are
appropriate.
4. Equivalence class testing is approximate when input data is defined
in terms of intervals and sets of discrete values. This is certainly
the case when system malfunctions can occur for out-of-limit
variable values.
5. Equivalence class testing is strengthened by a hybrid approach with
boundary value testing (BVA).
6. Equivalence class testing is used when the program function is
complex. In such cases, the complexity of the function can help
identify useful equivalence classes, as in the next date problem.
7. Strong equivalence class testing makes a presumption that the
variables are independent and the corresponding multiplication of
test cases raises issues of redundancy. If any dependencies occur,
they will often generate “error” test cases, as shown in the next
date function.
8. Several tries may be needed before the “right” equivalence relation
is established.
9. The difference between the strong and weak forms of equivalence
class testing is helpful in the distinction between progression and
regression testing.
Please note that the action entries in Rule-9 and Rules 1–4 are
NOT identical. It means that if the decision table were to process a
transaction in which C1 is true and both C2 and C3 are false, both rules
4 and 9 apply. We observe two things
1. Rules 4 and 9 are in-consistent because the action sets are different.
2. The whole table is non-deterministic because there is no way to
decide whether to apply Rule-4 or Rule-9.
Also note carefully that there is a bottom line for testers now. They
should take care when don’t care entries are being used in a decision
table.
3.3.3. EXAMPLES
3.3.3.1. TEST CASES FOR THE TRIANGLE PROBLEM USING DECISION TABLE
BASED TESTING TECHNIQUE
We have already studied the problem domain for the famous triangle
problem in previous chapters. Next we apply the decision table based
technique on the triangle problem. The following are the test cases:
So, we get a total of 11 functional test cases out of which three are
impossible cases, three fail to satisfy the triangle property, one
satisfies the equilateral triangle property, one satisfies the scalene
triangle property, and three ways to get an isoceles triangle.
Because we know that we have serious problems with the last day
of last month, i.e., December. We have to change month from 12 to 1.
So, we modify our classes as follows:
M1 = {month: month has 30 days}
M2 = {month: month has 31 days except December}
M3 = {month: month is December}
D1 = {day: 1 ≤ day ≤ 27}
D2 = {day: day = 28}
D3 = {day: day = 29}
D4 = {day: day = 30}
D5 = {day: day = 31}
Y1 = {year: year is a leap year}
Y2 = {year is a common year}
FIGURE 3.17 Test Cases for Next Date Problem Using Decision Table
Based Testing.
Because, we have 22 rules there are 22 test cases that are listed above.
The following guidelines have been found after studying the previous
examples:
1. This technique works well where lot of decision making takes
place such as the triangle problem and next date problem.
2. The decision table technique is indicated for applications
characterized by any of the following:
Prominant if-then-else logic.
Logical relationships among input variables.
Calculations involving subsets of the input variables.
Cause-and-effect relationships between inputs and outputs.
High cyclomatic complexity.
3. Decision tables do not scale up well. We need to “factor” large
tables into smaller ones to remove redundancy.
4. It works iteratively meaning that the table drawn in the first
iteration, and acts as a stepping stone to design new decision tables,
if the initial table is unsatisfactory.
3.4. CAUSE-EFFECT GRAPHING TECHNIQUE
Cause-effect graphing is basically a hardware testing technique
adapted to software testing. It is a black-box method. It considers only
the desired external behavior of a system. This is a testing technique
that aids in selecting test cases that logically relate causes (inputs) to
effects (outputs) to produce test cases.
Step 1. First, we must identify the causes and its effects. The causes
are:
C1: Side x is less than sum of y and z
C2: Side y is less than sum of x and z
C3: Side z is less than sum of x and y
C4: Side x is equal to side y
C5: Side x is equal to side z
C6: Side y is equal to side z
Step 4. Because there are 11 rules, we get 11 test cases and they are:
3.4.3. TEST CASES FOR PAYROLL PROBLEM
Problem 1. Consider the payroll system of a person.
a. If the salary of a person is less than $70,000 and expenses do not
exceed $30,000, then a 10% tax is charged by the IT department.
b. If the salary is greater than $60,000 and less than or equal to $3000
and expenses don’t exceed $40,000, then a 20% tax is charged by
the IT department.
c. For a salary greater than $3000, a 5% additional surcharge is also
charged.
d. If expenses are greater than $40,000, the surcharge is 9%.
Design test-cases using decision table based testing technique.
Solution. See the following steps:
Step 1. All causes and their effects are identified:
Causes Effects
C1: Salary < = 70,000 E1: 10% tax is charged.
C2: Salary > 60,000 and Salary < = E2: 20% tax is charged.
3000 E3: (20% tax) + (5% surcharge) is
C3: Salary > 3000 charged.
C4: Expenses < = 30,000 E4: (20% tax) + (9% surcharge) is
C5: Expenses < = 40,000 charged.
C6: Expenses > 40,000
That is, if C1 and C4 are 1 (or true) then the effect (or action) is E1.
Similarly, if C2 and C5 is 1 (or true), action to be taken is E2, and so
on.
Step 4. Because there are 4 rules in our decision table above, we must
have at least 4 test cases to test this system using this technique.
These test cases can be:
1. Salary = 20,000, Expenses = 2000
2. Salary = 100,000, Expenses = 10,000
3. Salary = 300,000, Expenses = 20,000
4. Salary = 300,000, Expenses = 50,000
So we can say that a decision table is used to derive the test cases
which can also take into account the boundary values.
We can say that the effort required to identify test cases is the
lowest in BVA and the highest in decision tables. The end result is a
trade-off between the test case effort identification and test case
execution effort. If we shift our effort toward more sophisticated
testing methods, we reduce our test execution time. This is very
important as tests are usually executed several times. Also note that,
judging testing quality in terms of the sheer number of test cases has
drawbacks similar to judging programming productivity in terms of
lines of code.
The examples that we have discussed so far show these trends.
NOTE
For an update on Kiviat charts using R! visit:
http://metrico.statanything.com/diagramas-kiviat-spider-charts-em-r/
Why Is It Needed?
The problem – multiple dimensions:
Computer: processor
• printer
• disks
• CDROM
• modem
Software
Personnel
All these together create multiple dimensions and hence the concept of
balance is needed.
FIGURE 3.26
FIGURE 3.28
FIGURE 3.29
FIGURE 3.30
FIGURE 3.31
FIGURE 3.32
FIGURE 3.33
FIGURE 3.34
Cost/Utilization—The Method
Cost/Utilization—The Measures
Cost/Utilization:
where: ui = percent utilization of factor i
pi = cost contribution of factor i
Balance:
Conclusions
It is essential to maintain balance between system components in order
to:
reduce costs.
maintain smooth functioning with no bottlenecks.
attain effectiveness AND efficiency.
SUMMARY
We summarize the scenarios under which each of these techniques
will be useful:
ANSWERS
1. c.
2. b.
3. b.
4. a.
5. b.
6. b.
7. a.
8. c.
9. a.
10. a.
CONCEPTUAL SHORT QUESTIONS WITH ANSWERS
Q. 1. Why we need to perform both types of testing?
Ans. A functional (Black-box) test case might be taken from the
documentation description of how to perform a certain function.
For example, accepting the bar code input.
On the other hand, a structural test case might be taken from a
technical documentation manual.
Both methods together validate the entire system and is shown in
Table.
Please note from the above discussion that as the type of statement
progresses from a simple sequential statement to if-then-else and
through loops, the number of test cases required to achieve statement
coverage increases. As we have already seen, exhaustive testing
(100%) is not possible, so exhaustive coverage of all statements in a
program will be impossible for practical purposes.
Even if we get a high level of the statement coverage, it does not
mean that the program is defect free.
Consider a program that implements wrong requirements and, if
such a code is fully tested with say, 100% coverage, it is still a wrong
program. Hence 100% code coverage does not mean anything.
Consider another example.
In this program, when we test with code = “y,” we will get 80%
code coverage. But if the data distribution in the real world is such that
90% of the time the value of code is not = “y,” then the program will
fail 90% of the time because of the exception-divide by zero. Thus,
even with a code coverage of 80%, we are left with a defect that hits
the users 90% of the time. The path coverage technique, discussed
next, overcomes this problem.
Path – 1: 1→2→6
Path – 2: 1→3→5→6
Path – 3: 1→3→4→5→6
Path – 4: 1→3→4→2→6
Categories of Metrics
There are three categories of metrics:
1. McCabe metrics
2. OO metrics
3. Grammar metrics
I. McCabe metrics
a. Cyclomatic complexity, V(G): It is the measure of the amount
of logic in a code module of 3rd and 4th generation languages.
If V(G) is excessively high then it leads to impenetrable code,
i.e., a code that is at a higher risk due to difficulty in testing.
The threshold value is 10. When V(G) > 10, then the likelihood
of code being unreliable is much higher. Please remember that
a high V(G) shows a decreased quality in the code resulting in
higher defects that become costly to fix.
b. Essential complexity: It is a measure of the degree to which a
code module contains unstructured constructs. If the essential
complexity is excessively high, it leads to impenetrable code,
i.e., a code that is at higher risk due to difficulty in testing.
Furthermore, the higher value will lead to increased cost due to
the need to refactor, or worse, reengineer the code. The
threshold value is 4. When the essential complexity is more
than 4 then the likelihood of the code being unmaintainable is
much higher. Please note that a high essential complexity
indicates increased maintenance costs with decreased code
quality. Some organizations have used the essential density
metric (EDM) defined as:
2. Code refactoring
If V(G) > 10 and the condition
V(G) – EV(g) ≤ V(g) is true
If the graph between V(G) against comment % (in terms of LOC) does
not show a linear increase then the comment content need to be
reviewed.
4. Test coverage
If the graph between V(G) against path coverage does not show a
linear increase then the test scripts need to be reviewed.
II. OO Metrics
a. Average V(G) for a class: If average V(G) > 10 then this
metric indicates a high level of logic in the methods of the class
which in turn indicates a possible dilution of the original object
model. If the average is high, then the class should be reviewed
for possible refactoring.
b. Average essential complexity for a class: If the average is
greater than one then it may indicate a dilution of the original
object model. If the average is high, then the class should be
reviewed for possible refactoring.
c. Number of parents: If the number of parents for a class is
greater than one then it indicates a potentially overly complex
inheritance tree.
d. Response for class (RFC): RFC is the count of all methods
within a class plus the number of methods accessible to an
object of this class due to implementation. Please note that the
larger the number of methods that can be invoked in response
to a message, the greater the difficulty in comprehension and
testing of the class. Also, note that low values indicate greater
specialization. If the RFC is high then making changes to this
class will be increasingly difficult due to the extended impact to
other classes (or methods).
e. Weighted methods for class (WMC): WMC is the count of
methods implemented in a class. It is a strong recommendation
that WMC does not exceed the value of 14. This metric is used
to show the effort required to rewrite or modify the class. The
aim is to keep this metric low.
f. Coupling between objects (CBO): It indicates the number of
non-inherited classes this class depends on. It shows the degree
to which this class can be reused.
For dynamic link libraries (DLLs) this measure is high as
the software is deployed as a complete entity.
For executables (.exe), it is low as here reuse is to be
encouraged. Please remember this point:
What is to be done?
i.e.,
We next show the basic notations that are used to draw a flow graph:
SOLVED EXAMPLES
EXAMPLE 4.1. Consider the following code:
Draw its flow graph, find its cyclomatic complexity, V(G), and the
independent paths.
SOLUTION. First, we try to number the nodes, as follows:
So, its flow graph is shown in Figure 4.4. Next, we try to find
V(G) by three methods:
FIGURE 4.4 Flow Graph for Example 4.1.
Draw its flow graph and compute its V(G). Also identify the
independent paths.
SOLUTION. The process of constructing the flow graph starts with
dividing the program into parts where flow of control has a single
entry and exit point. In this program, line numbers 2 to 4 are grouped
as one node (marked as “a”) only. This is because it consists of
declaration and initialization of variables. The second part comprises
of a while loop-outer one, from lines 5 to 19 and the third part is a
single printf statement at line number 20.
Note that the second part is again divided into four parts—
statements of lines 6 and 7, lines 8 to 12, line 13, and lines 14–17, i.e.,
if-then-else structure using the flow graph notation, we get this flow
graph in Figure 4.5.
Here, “*” indicates that the node is a predicate node, i.e., it has an
outdegree of 2.
The statements corresponding to various nodes are given below:
FIGURE 4.10
Draw its flowgraph, find V(G), and basis path set. Derive test cases
also.
SOLUTION. The flowgraph for the GCD program is shown in Figure
4.10.
∴ V(G) = Enclosed regions + 1 = 2 + 1 = 3
V(G) = e – n + 2 = 7 – 6 + 2 = 1 + 2 = 3
= P + 1 = 2 + 1 = 3 (∵ Nodes 1 and 3 are predicate
nodes)
SOLUTION.
Cyclomatic complexity is a software metric that provides a
quantitative measure of the logical complexity of a program.
Cyclomatic complexity has a foundation in graph theory and is
computed in one of the three ways:
i. The number of regions corresponds to the cyclomatic
complexity.
ii. Cyclomatic complexity: E – N + 2 (E is the number of edges,
and N is number of nodes).
iii. Cyclomatic complexity: P + 1 (P is the number of predicate
nodes).
FIGURE 4.11
Two test cases are required for complete branch coverage and four test
cases are required for complete path coverage.
Assumptions:
c1; if(i%2==0)
f1: EVEN()
f2: ODD()
c2: if(j > 0)
f3: POSITIVE()
f4: NEGATIVE()
i.e.
if(i%2==0){
EVEN();
}else{
ODD();
}
if(j < 0){
POSITIVE();
}else{
NEGATIVE();
}
Test cases that satisfy the branch coverage criteria, i.e., <c2, f1, c2,
f3> and <c1, f2, c2, f4>.
From a given flow graph, we can easily draw another graph that is
known as a decision-to-decision (DD) path graph. Our main
concentration now is on the decision nodes only. The nodes of the
flow graph are combined into a single node if they are in sequence.
SOLUTION.
a. Its program graph is as follows:
FIGURE 4.12
FIGURE 4.14
Note that if there are several links between two nodes then “+” sign
denotes a parallel link.
This is, however, not very useful. So, we assign a weight to each
entry of the graph matrix. We use “1” to denote that the edge is
present and “0” to show its absence. Such a matrix is known as a
connection matrix. For the Figure above, we will have the following
connection matrix:
FIGURE 4.19 Connection Matrix.
FIGURE 4.20
Now, we want to compute its V(G). For this, we draw the matrix
again, i.e., we sum each row of the above matrix. Then, we subtract 1
from each row. We, then, add this result or column of result and add 1
to it. This gives us V(G). For the above matrix, V(G) = 2.
FIGURE 4.21
FIGURE 4.22
FIGURE 4.23
Similarly, we can find two link or three link path matrices, i.e., A2,
A3, ... An – 1. These operations are easy to program and can be used as
a testing tool.
SOLUTION.
Let us rewrite the program again for easy drawing of its flow graph.
FIGURE 4.25
Now, let us find its dcu and dpu. We draw a table again as follows:
DD-path Nodes
A 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13
B 14
C 15, 16, 17, 18, 19
D 20, 21, 22, 23, 24, 25, 26, 27, 28
E 29
F 30, 31, 32, 33
G 34
H 35, 36, 37
I 38
J 39
K 40
L 41, 42
There will be a set of paths for each d. Mark the d nodes for the
variable on the graph and trace the paths. The baseline trace method
can be adapted for this tracing. Tabulate the paths as you trace them.
So, define/use paths for “x” are shown in Figure 4.29.
Note that the variable-x has d actions at nodes-1 and -2.
∴ Paths from node-1:
1–5–6–8–9–10 DU–
1–5–6–8–10 DU–
1–2 DUD
FIGURE 4.29 Trace Data Flow Graph for “X.”
1–5 DUD
1–2 DUD
Paths from node-2:
2–3 DD
2–4 DD
Paths from node-3:
3–6–7 DUD
3–6–8–10 DU–
Paths from node-4:
4–6–7 DUD
4–6–8–10 DU–
Paths from node-5:
5–6–7 DUD
5–6–8–10 DU–
Paths from node-7:
5–6–7 DUD
5–6–8–10 DU–
Similarly, the trace data flow for “Z” is as follows: Define/Use Paths
for Z are shown in Figure 4.31. The variable Z has d actions at nodes-
1 and-7.
∴ Paths from node-1 are:
1–5–6–7 DUD
1–5–6–8–9 DU–
1–5–6–8 DU–
1–2–3–6–7 DUD
1–2–4–6–7 DUD
1–2–3–6–8–9 DU–
1–2–3–6–8 DU–
Paths from node-7:
7–6–8–9 DU–
7–6–7 DU–
7–6–8 DU–
The (7 6)* means that path 7–6 (the loop) can be iterated. We require
that a loop is iterated at least twice.
Condition Comment
1. x ≤ 10 Force branch to node-5
2. y′ = z + x Calculation on node-5
3. x≤z+x Skip node-7, proceed to
4. x≤z node-8
Skip node-9, proceed to
node-10
The values that satisfy all these constraints can be found by trial and
error, graphing, or solving the resulting system of linear inequalities.
The set x = 0, y = 0, z = 0 works, so this path is feasible.
Try path 5: {1–2–3–6–8–10}
Condition Comment
1. x > 10 Force branch to node-2
2. x′ = x + 2 Calculation on node-2
3. y′ = y – 4 Calculation on node-2
4. x′ > z Force branch to node-3
5. x′ ≤ y′ Skip node-7, proceed to
node-8
6. x′ ≤ z Skip node-9, proceed to
node-10
Figures 4.32 and 4.33 show the trends for the number of test
coverage items and the effort to identify them as functions of
structural testing methods, respectively. These graphs illustrate the
importance of choosing an appropriate structural coverage metric.
SUMMARY
1. White-box testing can cover the following issues:
a. Memory leaks
b. Uninitialized memory
c. Garbage collection issues (in JAVA)
2. We must know about white-box testing tools also. They are
listed below:
a. Purify by Rational Software Corporation
b. Insure++ by ParaSoft Corporation
c. Quantify by Rational Software Corporation
d. Expeditor by OneRealm Inc.
ANSWERS
1. b.
2. b.
3. a.
4. b.
5. a.
6. a.
7. b.
8. b.
9. c.
10. a.
REVIEW QUESTIONS
1. White-box testing is complementary to black-box testing, not
alternative. Why? Give an example to prove this statement.
2. a. What is a flow graph and what it is used for?
b. Explain the type of testing done using flow graph?
3. Perform the following:
a. Write a program to determine whether a number is even or
odd.
b. Draw the paths graph and flow graph for the above
problem.
c. Determine the independent path for the above.
4. Why is exhaustive testing not possible?
5. a. Draw the flow graph of a binary search routine and find its
independent paths.
b. How do you measure
1. Test effectiveness?
2. Test efficiency?
6. Write short paragraphs on:
a. Mutation testing.
b. Error-oriented testing.
7. Differentiate between structural and functional testing in detail.
8. Will exhaustive testing guarantee that the program is 100%
correct?
9. a. What is cyclomatic complexity? How can we relate this to
independent paths?
b. Explain the usefulness of error guessing-testing technique.
10. Differentiate between functional and structural testing.
11. Discuss the limitations of structural testing. Why do we say
that complete testing is impossible?
12. Explain define/use testing. Consider any example and show
du-paths. Also identify those du-paths that are not dc-paths.
13. Find the cyclomatic complexity of the graph given below:
FIGURE 4.35
List the test cases for statement coverage, branch coverage, and
condition coverage.
19. Why is error seeding performed? How it is different from
mutation testing?
20. a. Describe all methods to calculate the cyclomatic
complexity.
b. What is the use of graph matrices?
21. Write a program to calculate the average of 10 numbers. Using
data flow testing design all du- paths and dc-paths in this
program.
22. Write a short paragraph on mutation testing.
23. Write a C/C++ program to multiply two matrices. Try to take
care of as many valid and invalid conditions are possible.
Identify the test data. Justify.
24. Discuss the negative effects of the following constructs from
the white-box testing point of view:
a. GO TO statements
b. Global variables
25. Write a C/C++ program to count the number of characters,
blanks, and tabs in a line. Perform the following:
a. Draw its flow graph.
b. Draw its DD-paths graph.
c. Find its V(G).
d. Identify du-paths.
e. Identify dc-paths.
26. Write the independent paths in the following DD-path graph.
Also calculate mathematically. Also name the decision nodes
shown in Figure 4.36.
27. What are the properties of cyclomatic complexity?
FIGURE 4.36
GRAY-BOX TESTING
Inside this Chapter:
5.0. Introduction to Gray-Box Testing
5.1. What Is Gray-Box Testing?
5.2. Various Other Definitions of Gray-Box Testing
5.3. Comparison of White-Box, Black-Box, and Gray-Box Testing Approaches in Tabular
Form
OR
SUMMARY
1. As testers, we get ideas for test cases from a wide range of
knowledge areas. This is partially because testing is much
more effective when we know what types of bugs we are
looking for. As testers of complex systems, we should strive to
attain a broad balance in our knowledge, learning enough
about many aspects of the software and systems being tested to
create a battery of tests that can challenge the software as
deeply as it will be challenged in the rough and tumble day-to-
day use.
2. Every tester in a test team need not be a gray-box tester. More
is the mix of different types of testers in a team, better is the
success.
ANSWERS
1. a.
2. b.
3. c.
4. b.
5. c.
REVIEW QUESTIONS
1. Define “gray-box testing.”
2. Give various other definitions of gray-box testing.
3. Compare white-box, black-box and gray-box testing
approaches?
4. How is gray-box testing related to white- and black-box
testing?
5. Gray-box testing is well suited for web applications testing.
Why?
6. Assume that you have to build the real-time large database
connectivity system software. Then what kinds of testing do
you think are suitable? Give a brief outline and justification for
any four kinds of testing.
CHAPTER
6
C—D—G—A—E—F—B
Although problems D and G have the same risk exposure, they
differ by their probability and severity values.
For some organizations, this method may produce enough
information. Others may wish to do risk-matrix analysis also. We will
now discuss risk matrix analysis.
We can see from the graph of Figure 6.2 that a risk with high
severity is deemed more important than a problem with high
probability. Thus, all risks mapped in the upper-left quadrant fall into
priority 2.
For example, the risk-e which has a high probability of occurrence
but a low severity of impact is put under priority 3.
Method II: For an entirely different application, we may swap the
definitions of priorities 2 and 3, as shown in Figure 6.3.
An organization favoring Figure 6.3 seeks to minimize the total
number of defects by focusing on problems with a high probability of
occurrence.
Dividing a risk matrix into quadrants is most common, testers can
determine the thresholds using different types of boundaries based on
application specific needs.
FIGURE 6.4 Method III.
Method IV: The problems with high severity must be given the top
priority, irrespective of the value of probability. This problem is
solved with method-IV and is shown in Figure 6.5. The remainder of
the risk matrix is partitioned into several lower priorities, either as
quadrants (Method-I and -II) or as diagonal bands (Method-III).
The retest-all strategy reuses all tests, but this strategy may waste time
and resources due to the execution of unnecessary tests. When the
change to a system is minor, this strategy would be wasteful.
FIGURE 6.6
Static slicing may lead to an unduly large program slice. So, Korel and
Laski proposed a method for obtaining dynamic slices from program
executions. They used a method to extract executable and smaller
slices and to allow more precise handling of arrays and other
structures. So, we discuss dynamic slicing.
Let “P” be the program under test and “t” be a test case against
which P has been executed. Let “l” be a location in P where variable v
is used. Now, the dynamic slice of P with respect to “t” and “v” is the
set of statements in P that lie in trace (t) and did effect the value of “v”
at “l.” So, the dynamic slice is empty if location “l” was not traversed
during this execution. Please note that the notion of a dynamic slice
grew out of that of a static slice based on program “P” and not on its
execution.
Let us solve an example now.
FIGURE 6.7
NOTE
NOTE
Dynamic slice contains all statements in trace (t) that had an effect on
program output.
Inferences mode:
SUMMARY
Regression testing is used to confirm that fixed bugs have, in fact,
been fixed and that new bugs have not been introduced in the process
and that features that were proven correctly functional are intact.
Depending on the size of a project, cycles of regression testing may be
performed once per milestone or once per build. Some bug regression
testing may also be performed during each acceptance test cycle,
focusing on only the most important bugs. Regression tests can be
automated.
ANSWERS
1. a.
2. d.
3. b.
4. a.
5. c.
6. a.
7. b.
8. c.
9. c.
10. a.
CONCEPTUAL SHORT QUESTIONS WITH ANSWERS
Q. 1. Explain the risk reduction method?
Ans. The formula for quantifying risk also explains how to control or
minimize risk. The formula is as follows:
REVIEW QUESTIONS
1. What do you mean by regression testing? Discuss the different
types of regression testing.
2. Define and discuss the following:
a. Regression testing and how regression test selection is done.
b. Selective retest and coverage techniques.
c. Minimization and safe techniques.
3. Write a short paragraph on regression testing.
4. What is regression testing? Discuss the regression test selection
problem.
5. What is the importance of regression testing?
6. Explain how risks are prioritized.
7. How can we reduce the number of test cases?
8. See the following priority scheme for test cases:
Priority 0: Test cases that check basic functionality are run for
accepting the build for further testing, and are run when the
product undergoes a major change. These test cases deliver a
very high project value to development teams and customers.
Priority 1: Uses the basic and normal setup and these test cases
deliver high project value to both development teams and
customers.
Priority 2: These test cases deliver moderate project value.
They are executed as part of the testing cycle and selected for
regression testing on a need basis.
Using this scheme of prioritization, prioritize the following test
cases as P0 or P1 or P2:
a. A test case for DBMS software that tests all options of a
select query.
b. A test case for a file system that checks for deallocation of
free space.
c. A test case that checks the functionality of a router/bridge.
d. A test case that tests the 0S boot strap process with normal
parameters.
e. A test case that checks a login form of a website.
9. Explain in brief the reduction schemes on prioritizing the test
cases to reduce required testing effort? As a tester, how do you
evaluate and rank potential problems? Suggest some guidelines
of your own approach to reduce the number of test cases.
10. Explain how risk matrix can be used to prioritize the test cases.
Explain giving an example. Why do we need to prioritize the
test cases?
11. a. What are prioritization categories and guidelines for test case
reduction?
b. What is the need for regression testing? How it is done?
12. Suppose your company is about to roll out an e-commerce
application. It is not possible to test the application on all types
of browsers on all platforms and operating systems. What steps
would you take in the testing environment to reduce the testing
process and all possible risks?
13. List and explain prioritization guidelines.
14. What is regression testing and the explain different types of
regression testing? Compare various regression testing
techniques.
15. a. What is the role of risk matrix for the reduction of test cases?
b. How is risk analysis used in testing? Explain the role of the
risk analysis table in testing.
CHAPTER
7
LEVELS OF TESTING
Inside this Chapter:
7.0. Introduction
7.1. Unit, Integration, System, and Acceptance Testing Relationship
7.2. Integration Testing
7.0. INTRODUCTION
When we talk of levels of testing, we are actually talking of three
levels of testing:
1. Unit testing
2. Integration testing
3. System testing
The three levels of testing are shown in Figure 7.1.
FIGURE 7.2
Unit (or module) testing “is the process of taking a module (an
atomic unit) and running it in isolation from the rest of the software
product by using prepared test cases and comparing the actual results
with the results predicted by the specification and design module.” It
is a white-box testing technique.
Importance of unit testing:
1. Because modules are being tested individually, testing
becomes easier.
2. It is more exhaustive.
3. Interface errors are eliminated.
TEST is one of the CASE tools for unit testing (Parasoft) that
automatically tests classes written in MS.NET framework. The tester
need not write a single test or a stub. There are tools which help to
organize and execute test suites at command line, API, or protocol
level. Some examples of such tools are:
FIGURE 7.4
Once all of the stubs for the main program have been provided, we
test the main program as if it were a standalone unit. We could apply
any of the appropriate functional and structural techniques and look
for faults. When we are convinced that the main program logic is
correct, we gradually replace the stubs with the actual code. Top-down
integration follows a breadth-first traversal (bfs) of the functional
decomposition tree.
NOTE
In this method of system testing, the test cases are developed and
checked against the design and architecture to see whether they are
actual product-level test cases. This technique helps in validating the
product features that are written based on customer scenarios and
verifying them using product implementation.
If there is a test case that is a customer scenario but failed
validation using this technique, then it is moved to the component or
integration testing phase. Because functional testing is performed at
various test phases, it is important to reject the test cases and move
them to an earlier phase to catch defects early and avoid any major
surprise at later phases.
We now list certain guidelines that are used to reject test cases for
system functional testing. They are:
1. Is this test case focusing on code logic, data structures, and unit
of the product?
If yes, then it belongs to unit testing.
2. Is this specified in the functional specification of any
component?
If yes, then it belongs to component testing.
3. Is this specified in design and architecture specification for
integration testing?
If yes, then it belongs to integration testing.
4. Is it focusing on product implementation but not visible to
customers?
If yes, then it is focusing on implementation to be covered in
unit/component/integration testing.
5. Is it the right mix of customer usage and product
implementation?
If yes, then it belongs to system testing.
NOTES
FIGURE 7.14
NOTE
These tools help identify the areas of code not yet exercised after
performing functional tests.
NOTE
TIPS
NOTE
Both spike and bounce tests determines how well the system behaves
when sudden changes of loads occur.
Two spikes together form a bounce test scenario. Then, the load
increases into the stress area to find the system limits. These load
spikes occur suddenly on recovery from a system failure.
There are differences between reliability and stress testing.
Reliability testing is performed by keeping a constant load condition
until the test case is completed. The load is increased only in the next
iteration to the test case.
In stress testing, the load is generally increased through various
means such as increasing the number of clients, users, and transactions
until and beyond the resources are completely utilized. When the load
keeps on increasing, the product reaches a stress point when some of
the transactions start failing due to resources not being available. The
failure rate may go up beyond this point. To continue the stress
testing, the load is slightly reduced below this stress point to see
whether the product recovers and whether the failure rate decreases
appropriately. This exercise of increasing/decreasing the load is
performed two or three times to check for consistency in behavior and
expectations (see Figure 7.15).
FIGURE 7.15
TIPS
Select those test cases that provide end-to-end functionality and run
them.
FIGURE 7.16
From this graph, it is clear that the load to the product can be
increased by increasing the number of users or by increasing the
number of concurrent operations of the product. Please note that
initially the throughput keeps increasing as the user load increases.
This is the ideal situation for any product and indicates that the
product is capable of delivering more when there are more users trying
to use the product. Beyond certain user load conditions (after the
bend), the throughput comes down. This is the period when the users
of the system notice a lack of satisfactory response and the system
starts taking more time to complete business transactions. The
“optimum throughput” is represented by the saturation point and is
one that represents the maximum throughput for the product.
2. Response time. It is defined as the delay between the point of request
and the first response from the product. In a typical client-server
environment, throughput represents the number of transactions that
can be handled by the server and response time represents the delay
between the request and response.
Also, note that it was mentioned earlier that customers might go to
a different website or application if a particular request takes more
time on this website or application. Hence, measuring response time
becomes an important activity of performance testing.
3. Latency. It is defined as the delay caused by the application,
operating system, and by the environment that are calculated
separately. In reality, not all the delay that happens between the
request and the response is caused by the product. In the networking
scenario, the network or other products which are sharing the network
resources can cause the delays. Hence, it is important to know what
delay the product causes and what delay the environment causes.
FIGURE 7.19
The performance test case is repeated for each row in this table
and factors such as the response time and throughput are recorded and
analyzed.
After the execution of performance test cases, various data points
are collected and the graphs are plotted. For example, the response
time graph is shown below:
FIGURE 7.20(A) Response Time.
Plotting the data helps in making an easy and quick analysis which
is difficult with only raw data.
FIGURE 7.21
SUMMARY
We can say that we start with unit or module testing. Then we go in
for integration testing, which is then followed by system testing. Then
we go in for acceptance testing and regression testing. Acceptance
testing may involve alpha and beta testing while regression testing is
done during maintenance.
System testing can comprise of “n” different tests. That is it could
mean:
1. End-to-end integration testing
2. User interface testing
3. Load testing in terms of
a. Volume/size
b. Number of simultaneous users
c. Transactions per minute/second (TPM/TPS)
4. Stress testing
5. Testing of availability (24 × 7)
Performance testing is a type of testing that is easy to understand
but difficult to perform due to the amount of information and effort
needed.
ANSWERS
1. a.
2. a.
3. b.
4. b.
5. d.
6. b.
7. d.
8. b.
9. c.
10. a.
Weight Meaning
+2 Must test, mission/safety critical
+1 Essential functionality, necessary for robust operation
+0 All other scenarios
OBJECT-ORIENTED TESTING
Inside this Chapter:
8.0. Basic Unit for Testing, Inheritance, and Testing
8.1. Basic Concepts of State Machines
8.2. Testing Object-Oriented Systems
8.3. Heuristics for Class Testing
8.4. Levels of Object-Oriented Testing
8.5. Unit Testing a Class
8.6. Integration Testing of Classes
8.7. System Testing (with Case Study)
8.8. Regression and Acceptance Testing
8.9. Managing the Test Process
8.10. Design for Testability (DFT)
8.11. GUI Testing
8.12. Comparison of Conventional and Object-Oriented Testing
8.13. Testing Using Orthogonal Arrays
8.14. Test Execution Issues
8.15. Case Study—Currency Converter Application
The class clusters are the practical unit for testing. This is due to the
following reasons:
a. It is typically impossible to test a class in total isolation.
b. It is not cost effective to develop a complete set of drivers and
stubs for every class.
c. A smaller testing budget usually means larger clusters.
We have different types of classes such as application specific,
general-purpose, abstract or parameterized (template) classes.
Therefore we need different test requirements for each class.
Case I: Extension
Suppose we change some methods in class A. Clearly,
We need to retest the changed methods.
We need to retest interaction among changed and unchanged
methods.
We need to retest unchanged methods, if data flow exists between
statements, in changed and unchanged methods.
But, what about unchanged subclass B, which inherits from A? By
anticomposition:
Here, we will not find the error unless we retest both number (DC)
and the inherited, previously tested, init balance( ) member functions.
FIGURE 8.2
Later, we specialize cert of deposit to have its own rollover ( ). That is,
FIGURE 8.3 Overriding Case.
SOLVED EXAMPLES
EXAMPLE 8.1. Consider the following code for the shape class
hierarchy.
What kind of testing is required for this class hierarchy?
SOLUTION. We can use method-specific retesting and test case
reuse for the shape class hierarchy.
Let D = denote, develop, and execute test suite.
R = Reuse and execute superclass test suite.
E = Extend and execute superclass test suite.
S = Skip, super’s test adequate.
N = Not testable.
Then, we get the following table that tells which type of testing is
to be performed.
NA = Not Applicable
1. By antiextensionality (different implementation of the same
function requires different tests).
2. By anticomposition (individual method test cases are not sufficient
to test method interactions).
3. New test cases are needed when inherited features use any locally
defined features.
4. Superclass test cases are reusable only to the extent that the super
and subclass have the same pre- and post-conditions.
5. A pure extension subclass is an exception.
The subclass consists of entirely new features.
There are no interactions between the new and inherited
features.
State-Based Behavior
A state machine accepts only certain sequences of input and rejects all
others. Each accepted input/state pair results in a specific output.
State-based behavior means that the same input is not necessarily
always accepted and when accepted, does not necessarily produce the
same output.
This simple mechanism can perform very complex control tasks.
Examples of sequentially constrained behavior include:
a. GUI interface control in MS-Windows
b. Modem controller
c. Device drivers with retry, restart, or recovery
d. Command syntax parser
e. Long-lived database transactions
f. Anything designed by a state model
The central idea is that sequence matters. Object behavior can be
readily modeled by a state machine.
A state machine is a model that describes behavior of the system
under test in terms of events (inputs), states, and actions (outputs).
FIGURE 8.4
A Water-Tank Example—STD
We draw STD of a water tank system with a valve. This valve can be
in one of the two states—shut or open. So, we have the following:
Mealy/Moore Machines
There are two main variants of state models (named for their
developers).
Moore Machine:
Transitions do not have output.
An output action is associated with each state. States are active.
Mealy Machine:
Transitions have output.
No output action is associated with state. States are passive.
In software engineering models, the output action often represents
the activation of a process, program, method, or module.
Although the Mealy and Moore models are mathematically
equivalent, the Mealy type is preferred for software engineering.
A passive state can be precisely defined by its variables. When the
same output action is associated with several transitions, the Mealy
machine provides a more compact representation.
Conditional/Guarded Transitions
Basic state models do not represent conditional transitions. This is
remedied by allowing a Boolean conditions on event or state variables.
Consider a state model for stack class. It has three states: empty,
loaded, and full.
We first draw the state machine model for a STACK class, without
guarded transitions. The initial state is “Empty.”
What is a guard? It is a predicate expression associated with an
event. Now, we draw another state machine model for STACK class,
with guarded transitions.
SOLUTION.
The game starts.
The player who presses the start button first gets the first serve.
The button press is modeled as the player-1 start and player-2
start events.
The current player serves and a volley follows. One of three things
end the volley.
If the server misses the ball, the server’s opponent becomes the
server.
If the server’s opponent misses the ball, the server’s score is
incremented and gets another chance.
If the server’s opponent misses the ball and the server’s score is at
the game point, the server is declared winner.
FIGURE 8.9
Properties of Statecharts
1. They use two types of state: group and basic.
2. Hierarchy is based on a set-theoretic for malism (hypergraphs).
3. Easy to represent concurrent or parallel states and processes.
Therefore, we can say that:
A basic state model and its equivalent statechart are shown below:
FIGURE 8.10
Figure 8.12 shows the statechart for the traffic light system.
FIGURE 8.12 Statechart for the Traffic Light.
Concatenation
Concatenation involves the formation of a subclass that has no locally
defined features other than the minimum requirement of a class
definition.
State Space
A subclass state space results from the two factors:
FIGURE 8.13
TIPS
Class hierarchies that do not meet these conditions are very likely to
be buggy.
Missing transition:
FIGURE 8.14
FIGURE 8.15
Missing action:
FIGURE 8.16
FIGURE 8.17
EXAMPLE 8.7. For a three player game, what conformance test suite
will you form? Derive the test cases.
SOLUTION.
TABLE 8.2 Sneak Path Test Suite for Three Player Game.
8.2. TESTING OBJECT-ORIENTED SYSTEMS
Conventional test case designs are based on the process they are to test
and its inputs and outputs. Object-oriented test cases need to
concentrate on the state of a class. To examine the different states, the
cases have to follow the appropriate sequence of operations in the
class. Class becomes the main target of 00 testing. Operations of a
class can be tested using the conventional white-box methods and
techniques (basis path, loop, data flow) but there is some notion to
apply these at the class level instead.
We draw its control graph as it is our main tool for test case
identification shown in Figure 8.22.
FIGURE 8.22 Flowgraph for C++ Code.
Predicate Testing
A predicate is the condition in a control statement: if, case, do while,
do until, or for. The evaluation of a predicate selects a segment of code
to be executed.
Decision Coverage
We can improve on statement coverage by requiring that each decision
branch be taken at least once (at least one true and one false
evaluation). Either of the test suites below provides decision (C2)
coverage for the abx ( ) method.
TABLE 8.3 Test Suite for Decision Coverage of abx ( ) Method (function).
Decision Coverage
It does not require testing all possible outcomes of each condition. It
improves on this by requiring that each condition be evaluated as true
or false at least once. There are four conditions in the abx ( ) method.
Decision/Condition Coverage
For the same value of x, paths <A> <C> and <B> <D> are not
possible.
Because the predicates could be merged, you may have found a
fault or at least a questionable piece of code.
4. Unstructured Code.
Acceptable: Exception handling, break.
Not acceptable: Anything else.
Thus, we have
C * = em + 2m - nm - ns + 2
FIGURE 8.24
A Testable Function
Must be independently invocable and observable.
Is typically a single responsibility and the collaborations necessary
to carry it out.
Often corresponds to a specific user command or menu action.
Testable functions should be organized into a hierarchy
Follow the existing design.
Develop a test function hierarchy.
Testable functions should be small, “atomic” units of work.
A method is a typically testable function for a class-level test. A
use case is a typically testable function for a cluster-level or system
test.
For numerical functions, how many test cases do we need?
At least two.
If there are n variables, we need (n + 1) test cases.
What values should we use?
Each value in the test suite must be unique.
Do not use 1 (1.0) or 0 (0.0) for input values.
Select values that are expected to produce a non-zero result.
If a variable is returned by a message, the message must be forced
to provide a non-result.
This test will reveal all errors in which one or more coefficients is
incorrect.
Test cases are defined in two steps:
Step 1. Prepare a matrix with one more column than there are
variables. This extra column is filled with “1,” which is used
to check the determinant but not as part of the test case.
Step 2. Find values for the variable matrix such that the determinant
of the entire matrix is not zero. This requires that
No row or column consists entirely of zeros.
No row or column is identical.
No row or column is an exact multiple of any other.
So, for F = (10 * x) – (x + y) ^ 3, we have
NOTE
FIGURE 8.25
b. Conditional transition tests: With conditional transitions, we
need to be sure that all conditional transition outcomes have been
exercised.
During conformance testing, we want a conditional transition
to fire when we send a message which meets its condition.
For each conditional transition, we need to develop a truth
table for the variables in the condition.
An additional test case is developed for each entry in the truth
table which is not exercised by the conformance tests.
This test is added to the transition tree.
Entity-relationship model:
FIGURE 8.26
FIGURE 8.27
Exception Testing
Exception handling (like Ada exceptions, C++ try/throw/catch) add
implicit paths. It is harder to write cases to activate these paths.
However, exception handling is often crucial for reliable operations
and should be tested. Test cases are needed to force exceptions.
File errors (empty, overflow, missing)
I/O errors (device not ready, parity check)
Arithmetic over/under flows
Memory allocation
Task communication/creation
How can this testing be done?
1. Use patches and breakpoints: Zap the code or data to fake an
error.
2. Use selective compilation: Insert exception-forcing code (e.g.,
divide-by-zero) under control of conditional assembly, macro
definition, etc.
3. Mistune: Cut down the available storage, disk space, etc. to 10%
of normal, for example, saturate the system with compute bound
tasks. This can force resource related exceptions.
4. Cripple: Remove, rename, disable, delete, or unplug necessary
resources.
5. Pollute: Selectively corrupt input data, files, or signals using a data
zap tool.
Suspicion Testing
There are many situations that indicate additional testing may be
valuable [Hamlet]. Some of those situations are given below:
1. A module written by the least experienced programmer.
2. A module with a high failure rate in either the field or in
development.
3. A module that failed an inspection and needed big changes at the
last minute.
4. A module that was subject to a late or large change order after most
of the coding was done.
5. A module about which a designer or programmer feels uneasy.
These situations don’t point to specific faults. They may mean
more extensive testing is warranted. For example if n-tests are needed
for branch coverage, use 5n instead to test.
Error Guessing
Experience, hunches, or educated guesses can suggest good test cases.
There is no systematic procedure for guessing errors. According to
Beizer, “logic errors and fuzzy thinking are inversely proportional to
the probability of a path’s execution.”
For example, for a program that sorts a list, we could try:
An empty input list.
An input list with only one item.
A list where all entries have the same value.
A list that is already sorted.
We can try for weird paths:
Try to find the most tortuous, longest, strongest path from entry to
exit.
Try “impossible” paths, and so on.
The idea is to find special cases that may have been overlooked by
more systematic techniques.
Historical Analysis
Metrics from past projects or previous releases may suggest possible
trouble spots. We have already noted that C metric was a good
predictor of faults. Coupling and cohesion are also good fault
predictors. Modules with high coupling and low cohesion are 7 times
more likely to have defects compared to modules with low coupling
and high cohesion.
Use the same test case patterns in different ways and in different
contexts.
Try to combine test cases in random, unusual, strange, or weird
ways. This increases the chance of revealing a sneak path, a
surprise, or an omission.
1. Client/Supplier Integration
This integration is done by “users.” The following steps are followed:
Step 1. We first integrate all servers, that is, those objects that do
not send messages to other application objects.
Step 2. Next we integrate agents, i.e., those objects that send and
receive messages. This first integration build consists of
the immediate clients of the application servers.
Step 3. There may be several agent builds.
Step 4. Finally, we integrate all actors, i.e., application objects
that send messages but do not receive them.
This technique is called client/supplier integration and is shown in
Figure 8.29.
FIGURE 8.29 Client/Supplier Integration.
2. Thread Integration
Thread integration is integration by end-to-end paths. A use case
contains at least one, possibly several threads.
Threaded integration is an incremental technique. Each processing
function is called a thread. A collection of related threads is often
called a build. Builds may serve as a basis for test management. The
addition of new threads for the product undergoing integration
proceeds incrementally in a planned fashion. System verification
diagrams are used for “threading” the requirements.
3. Configuration Integration
In systems where there are many unique target environment
configurations, it may be useful to try to build each configuration. For
example, in a distributed system, this could be all or part of the
application allocated to a particular node or processor. In this
situation, servers and actors are likely to encapsulate the physical
interface to other nodes, processors, channels, etc. It may be useful to
build actor simulators to drive the physical subsystem in an
controllable and repeatable manner.
Configuration integration has three main steps:
1. Identify the component for a physical configuration.
2. Use message-path or thread-based integration for this
subsystem.
3. Integrate the stabilized subsystems using a thread-based
approach.
4. Hybrid Strategy
A general hybrid strategy is shown in the following steps:
a. Do complete class testing on actors and servers. Perform limited
bottom-up integration.
b. Do top-down development and integration of the high-level control
modules. This provides a harness for subsequent integration.
c. Big-bang the minimum software infrastructure: OS configuration,
database initialization, etc.
d. Achieve a high coverage for infrastructure by functional and
structural testing.
e. Big-bang the infrastructure and high-level control.
f. Use several message path builds or thread builds to integrate the
application agents.
Users
The following questions can help to identify user categories:
Who?
Who are the users?
Can you find any dichotomies?
— Big company versus small
— Novice versus experienced
— Infrequent versus heavy user
Experience: Education, culture, language, training, work with
similar systems, etc.
Why?
What are their goals in performing the task—what do they
want?
What do they produce with the system?
How?
What other things are necessary to perform the task?
— Information, other systems, time, money, materials,
energy, etc.
What methods or procedures do they use?
Environment
The user/task environment (as well as the OS or computer) may span a
wide range of conditions.
Consider any system embedded in a vehicle. Anywhere the vehicle
can be taken is a possible environment.
What external factors are relevant to the user? To the system’s
ability to perform? For example, buildings, weather, electromagnetic
interference, etc.
What internal factors are relevant to the user? To the system’s
ability to perform? For example, platform resources like speed,
memory, ports, etc., AC power system loading, multitasking.
With scenarios categories in hand, we can focus on specific test
cases. This is called an operational profile.
An activity is a specific discrete interaction with the system.
Ideally, an activity closely corresponds to an event-response pair. It
could be a subjective definition but must have a start/stop cycle. We
can refine each activity into a test by specifying:
Probability of occurrence.
Data values derived by partitioning.
Equivalence classes are scenario-oriented.
Scenarios are a powerful technique but have limitations and
require a concentrated effort. So, we have the following suggestions:
User/customer cooperation will probably be needed to identify
realistic scenarios.
Scenarios should be validated with user/customer or a focus
group.
Test development and evaluation requires people with a high level
of product expertise who are typically in short supply.
Generate a large number of test cases.
Well-defined housekeeping procedures and automated support is
needed if the scenarios will be used over a long period of time by
many people.
Next we consider a case study of ACME Widget Co.
We will illustrate the operational profile (or specific test cases)
with the ACME Widget Co. order system.
Users
There are 1000 users of the ACME Widget order system.
Their usage patterns differ according to how often they use the
system. Of the total group, 300 are experienced, and about 500
will use the system on a monthly or quarterly basis. The balance
will use the system less than once every six months.
Environment
Several locations have significantly different usage patterns.
Plant, office, customer site, and hand-held access.
Some locations are only visited by certain users. For example,
only experienced users go to customer sites.
Usage
The main user-activities are order entry, order inquiry, order
update, printing a shipping ticket, and producing periodic reports.
After studying the usage patterns, we find proportions vary by user
type and location.
For example, the infrequent user will never print a shipping ticket
but is likely to request periodic reports.
Some scenarios are shown in Table 8.5.
NOTE
Or
It is defined as the process to verify absence of unintended effects.
Or
It is defined as the process of verifying compliance with all old and
new requirements.
Approach used
Reveal faults in new or modified modules. This requires running
new test cases and typically reusing old test cases.
Reveal faults in unchanged modules. This requires re-running old
test cases.
Requires reusable library of test suites.
When to do?
Periodically, every three months.
After every integration of fixes and enhancements.
Frequency, volume, and impact must be considered.
What to test?
Changes result from new requirements or fixes.
Analysis of the requirements hierarchy may suggest which subset
to select.
If new modules have been added, you should redetermine the call
paths required for CI coverage.
Acceptance Testing
On completion of the developer administered system test, three
additional forms of system testing may be appropriate.
a. Alpha test: Its main features are:
1. It is generally done “in-house” by an independent test
organization.
2. The focus is on simulating real-world usage.
3. Scenario-based tests are emphasized.
b. Beta test: It’s main features are:
1. It is done by representative groups of users or customers with
prerelease system installed in an actual target environment.
2. Customer attempts routine usage under typical operating
conditions.
3. Testing is completed when failure rate stabilizes.
c. Acceptance test: Its main features are:
1. Customer runs test to determine whether or not to accept the
system.
2. Requires meeting of the minds on acceptance criterion and
acceptance test plan.
Choice of Standards
The planning aspects are proactive measures that can have an across-
the-board influence on all testing projects.
Standards comprise an important part of planning in any
organization. Standards are of two types:
1. External standards
2. Internal standards
External standards are standards that a product should comply
with, are externally visible, and are usually stipulated by external
consortia. From a testing perspective, these standards include standard
tests supplied by external consortia and acceptance tests supplied by
customers.
Internal standards are standards formulated by a testing
organization to bring in consistency and predictability. They
standardize the processes and methods of working within the
organization. Some of the internal standards include
1. Naming and storage conventions for test artifacts
2. Document standards
3. Test coding standards
4. Test reporting standards
These standards provide a competitive edge to a testing
organization. It increases the confidence level one can have on the
quality of the final product. In addition, any anomalies can be brought
to light in a timely manner.
Testing requires a robust infrastructure to be planned upfront. This
infrastructure is made up of three essential elements. They are as
follows:
a. A test case database
b. A defect repository
c. SCM repository and tool
A test case database captures all of the relevant information about
the test cases in an organization.
A defect repository captures all of the relevant details of defects
reported for a product. It is an important vehicle of communication
that influences the work flow within a software organization.
A software configuration management (SCM) repository/CM
repository keeps track of change control and version control of all the
files/entities that make up a software product. A particular case of the
files/entities is test files.
Built-in test features are shown in Figure 8.31 and are summarized
below:
1. Assertions automate basic checking and provide “set and forget”
runtime checking of basic conditions for correct execution.
2. Set/Reset provides controllability.
3. Reporters provide observability.
4. A test suite is a collection of test cases and plan to use them. IEEE
standard 829 defines the general contents of a test plan.
5. Test tools require automation. Without automationless testing,
greater costs will be incurred to achieve a given reliability goal.
The absence of tools inhibits testability.
6. Test process: The overall software process capability and maturity
can significantly facilitate or hinder testability. This model follows
the key process ability of the defined level for software product
engineering.
FIGURE 8.33
Third Level: To derive test cases from the finite state machines
derived from a finite state machine description of the external appearance
of the GUI. This is shown below:
A test case from this formulation is a circuit. A path in which the start
node is the end node is usually an idle state. Nine such test cases are
shown in the table below. The numbers in the table show the sequence in
which the states are traversed by the test case. The test cases, TC1 to
TC9, are as follows:
FIGURE 8.35 Test Cases Derived from FSM.
SUMMARY
Various key object-oriented concepts can be tested using some testing
methods and tools. They are summarized below:
ANSWERS
1. a.
2. a.
3. c.
4. c.
5. a.
6. d.
7. a.
8. b.
9. b.
10. c.
REVIEW QUESTIONS
1. Object-oriented languages like JAVA do not support pointers.
This makes testing easier. Explain how.
2. Consider a nested class. Each class has one method. What kind
of problems will you encounter during testing of such nested
classes? What about their objects?
3. Explain the following:
a. Unit and integration testing
b. Object-oriented testing
4. Write and explain some common inheritance related bugs.
5. How is object-oriented testing different from procedural
testing? Explain with examples.
6. Describe all the methods for class testing.
7. Write a short paragraph on issues in object-oriented testing.
8. Explain briefly about object-oriented testing methods with
examples. Suggest how you test object-oriented systems by
use-case approach.
9. Illustrate “how do you design interclass test cases.” What are
the various testing methods applicable at the class level?
10. a. What are the implications of inheritance and polymorphism
in object-oriented testing?
b. How does GUI testing differ from normal testing? How is
GUI testing done?
11. With the help of suitable examples, demonstrate how
integration testing and system testing is done for object-
oriented systems?
12. How reusability features can be exploited by object-oriented
testing approach?
13. a. Discuss the salient features of GUI testing. How is it
different from class testing?
b. Explain the testing process for object-oriented programs
(systems).
14. Draw a state machine model for a two-player game and also
write all possible control faults from the diagram.
CHAPTER
9
AUTOMATED TESTING
Inside this Chapter:
9.0. Automated Testing
9.1. Consideration During Automated Testing
9.2. Types of Testing Tools-Static V/s Dynamic
9.3. Problems with Manual Testing
9.4. Benefits of Automated Testing
9.5. Disadvantages of Automated Testing
9.6. Skills Needed for Using Automated Tools
9.7. Test Automation: “No Silver Bullet”
9.8. Debugging
9.9. Criteria for Selection of Test Tools
9.10. Steps for Tool Selection
9.11. Characteristics of Modern Tools
9.12. Case Study on Automated Tools, Namely, Rational Robot, WinRunner, Silk Test, and
Load Runner
See Table on next page for certain other tools used during testing
and their field of applications.
Static testing tools seek to support the static testing process whereas
dynamic testing tools support the dynamic testing process. Note that
static testing is different from dynamic testing. We tabulate the
differences between static and dynamic testing before discussing its
tools. See Table 9.2.
Software testing tools are frequently used to ensure consistency,
thoroughness, and efficiency in testing software products and to fulfill
the requirements of planned testing activities. These tools may
facilitate unit (module) testing and subsequent integration testing (e.g.,
drivers and stubs) as well as commercial software testing tools.
Testing tools can be classified into one of the two categories listed
below:
a. Static Test Tools: These tools do not involve actual input and
output. Rather, they take a symbolic approach to testing, i.e., they
do not test the actual execution of the software. These tools include
the following:
a. Flow analyzers: They ensure consistency in data flow from
input to output.
b. Path tests: They find unused code and code with contradictions.
c. Coverage analyzers: It ensures that all logic paths are tested.
d. Interface analyzers: It examines the effects of passing variables
and data between modules.
b. Dynamic Test Tools: These tools test the software system with
“live” data. Dynamic test tools include the following:
a. Test driver: It inputs data into a module-under-test (MUT).
b. Test beds: It simultaneously displays source code along with
the program under execution.
c. Emulators: The response facilities are used to emulate parts of
the system not yet developed.
d. Mutation analyzers: The errors are deliberately “fed” into the
code in order to test fault tolerance of the system.
9.8. DEBUGGING
Debugging occurs as a consequence of successful testing. That is,
when a test case uncovers an error, debugging is the process that
results in the removal of the error. After testing, we begin an
investigation to locate the error, i.e., to find out which module or
interface is causing it. Then that section of the code is to be studied to
determine the cause of the problem. This process is called debugging.
Debugging is an activity of locating and correcting errors.
Debugging is not testing but it always occurs as a consequence of
testing. The debugging process begins with the execution of a test
case. The debugging process will always have one of the two
outcomes.
1. The cause will be found, corrected, and removed.
2. The cause will not be found.
During debugging, we encounter errors that range from mildly
annoying to catastrophic. Some guidelines that are followed while
performing debugging are:
1. Debugging is the process of solving a problem. Hence, individuals
involved in debugging should understand all of the causes of an
error before starting with debugging.
2. No experimentation should be done while performing debugging.
The experimental changes often increase the problem by adding
new errors in it.
3. When there is an error in one segment of a program, there is a high
possibility of the presence of another error in that program. So, the
rest of the program should be properly examined.
4. It is necessary to confirm that the new code added in a program to
fix errors is correct. And to ensure this, regression testing should be
performed.
Debugging Approaches
Several approaches have been discussed in literature for debugging
software-under-test (SUT). Some of them are discussed below.
1. Brute Force Method: This method is most common and least
efficient for isolating the cause of a software error. We apply this
method when all else fails. In this method, a printout of all registers
and relevant memory locations is obtained and studied. All dumps
should be well documented and retained for possible use on
subsequent problems.
2. Back Tracking Method: It is a fairly common debugging
approach that can be used successfully in small programs.
Beginning at the site where a sympton has been uncovered, the
source code is traced backward until the site of the cause is found.
Unfortunately, as the number of source lines increases, the number
of potential backward paths may become unmanageably large.
3. Cause Elimination: The third approach to debugging, cause
elimination, is manifested by induction or deduction and introduces
the concept of binary partitioning. This approach is also called
induction and deduction. Data related to the error occurrence are
organized to isolate potential causes. A cause hypothesis is devised
and the data are used to prove or disprove the hypothesis.
Alternatively, a list of all possible causes is developed and tests are
conducted to eliminate each. If initial tests indicate that a particular
cause hypothesis shows promise, the data are refined in an attempt
to isolate the bug.
Tools for Debugging: Each of the above debugging approaches can
be supplemented with debugging tools. For debugging we can apply a
wide variety of debugging tools such as debugging compilers,
dynamic debugging aids, automatic test case generators, memory
dumps, and cross reference maps. The following are the main
debugging tools:
1. Turbo Debugger for Windows: The first debugger that comes to
mind when you think of a tool especially suited to debug your
Delphi code is Borland’s own Turbo Debugger for Windows.
2. Heap Trace: Heap Trace is a shareware heap debugger for Delphi
1·X and 2·X applications that enables debugging of heap memory
use. It helps you to find memory leaks, dangling pointers, and
memory overruns in your programs. It also provides optional
logging of all memory allocations, de-allocations, and errors. Heap
trace is optimized for speed, so there is only a small impact on
performance even on larger applications. Heap trace is
configurable and you can also change the format and destination of
logging output, choose what to trace, etc. You can trace each
allocation and de-allocation and find out where each block of
memory is being created and freed. Heap trace can be used to
simulate out of memory condition to test your program in stress
conditions.
3. MemMonD: MemMonD is another shareware memory monitor
for Delphi 1·X applications. It is a stand-alone utility for
monitoring memory and stack use. You don’t need to change your
source code but only need to compile with debug information
included. MemMonD detects memory leaks and deallocations with
wrong size.
4. Re-Act: Re-Act is not really a debugger for Delphi but more a
Delphi component tester. However, this tool is a real pleasure to
use. So we could not resist including it in this list of debugging
tools. Currently, the reach is for Delphi 2 only, but a 16-bit version
is in the works. Re-Act version 2.0 is a really nice component. It
can view and change properties at run time with the built in
component inspector, monitor events in real time, set breakpoints,
and log events visually and dynamically. You can find elusive
bugs, evaluate third-party components, and learn how poorly
documented components really work. If you build or purchase
components you need this tool. It’s totally integrated with Delphi
2.0 and the CDK 2.0.
SUMMARY
Testing is an expensive and laborious phase of the software process.
As a result, testing tools were among the first software tools to be
developed. These tools now offer a range of facilities and their use.
Significantly reduces the cost of the testing process. Different testing
tools may be integrated into the testing workbench.
These tools are:
1. Test manager: It manages the running of program tests. It keeps
track of test data, expected results, and program facilities tested.
2. Test data generator: It generates test data for the program to be
tested. This may be accomplished by selecting data from a
database.
3. Oracle: It generates predictions of expected test results.
4. File comparator: It compares the results of program tests with
previous test results and reports difference between them.
5. Report generator: It provides report definition and generation
facilities for test results.
6. Dynamic analyzer: It adds code to a program to count the number
of times each statement has been executed. After the tests have
been run, an execution profile is generated showing how often each
program statement has been executed.
Testing workbenches invariably have to be adapted to the test suite
of each system. A significant amount of effort and time is usually
needed to create a comprehensive testing workbench. Most testing
work benches are open systems because testing needs are organization
specific.
Automation, however, makes life easier for testers but is not a
“Silver bullet.” It makes life easier for testers for better reproduction
of test results, coverage, and reduction in effort. With automation we
can produce better and more effective metrics that can help in
understanding the state of health of a product in a quantifiable way,
thus taking us to the next change.
ANSWERS
1. a.
2. e.
3. b.
4. a.
5. d.
6. a.
7. a.
8. b.
9. a.
10. a.
REVIEW QUESTIONS
1. Answer the following:
a. What is debugging?
b. What are different approaches to debugging?
c. Why is exhaustive testing not possible?
2. Explain the following:
a. Modern testing tools.
3. a. Differentiate between static and dynamic testing tools with
examples in detail?
b. Will exhaustive testing guarantee that the program is 100%
correct?
4. Compare testing with debugging.
5. Differentiate between static and dynamic testing.
6. Write a short paragraph on testing tools.
7. Compare testing with debugging.
8. Explain back tracking method for debugging.
9. Differentiate between static and dynamic testing tools.
10. What are the benefits of automated testing tools over
conventional testing tools?
11. Discuss various debugging approaches with some examples.
12. a. What is debugging? Describe various debugging
approaches.
b. Differentiate between static testing tools and dynamic
testing tools.
13. Briefly discuss dynamic testing tools.
14. Write a short paragraph on any two:
a. Static testing tools.
b. Dynamic testing tools.
c. Characteristics of modern tools.
15. a. Discuss in detail automated testing and tools. What are the
advantages and disadvantages?
b. Explain in brief modern tools in the context of software
development and their advantages and disadvantages.
16. List and explain the characteristics of modern testing tools.
17. Explain modern testing tools.
18. Write a short paragraph on static and dynamic testing tools.
CHAPTER
10
10.0. INTRODUCTION
There are a number of accepted techniques for estimating the size of
the software. This chapter describes the test estimate preparation
technique known as test point analysis (TPA). TPA can be applied for
estimating the size of testing effort in black-box testing, i.e., system
and acceptance testing. The goal of this technique is to outline all the
major factors that affect testing projects and to ultimately do an
accurate test effort estimation. On time project delivery cannot be
achieved without an accurate and reliable test effort estimate.
Effective test effort estimation is one of the most challenging and
important activity in software testing. There are many popular models
for test effort estimation in vogue today. One of the most popular
methods is FPA. However, this technique can only be used for white-
box testing. Organizations specializing in niche areas need an
estimation model that can accurately calculate the testing effort of the
application-under-test.
TPA is one such method that can be applied for estimating test
effort in black-box testing. It is a 6-step approach to test estimation
and planning. We believe that our approach has a good potential for
providing test estimation for various projects. Our target audience for
using this approach would be anyone who would want to have a
precise test effort estimation technique for any given application-
under-test (AUT).
Ineffective test effort estimation leads to schedule and cost
overruns. This is due to a lack of understanding of the development
process and constraints faced in the process. But we believe that our
approach overcomes all these limitations.
To this end, the problem will be approached from a mathematical
perspective. We will be implementing the following testing metrics in
C++: static test points, dynamic test points, total number of test points,
and primary test hours.
We will be illustrating TPA using following case study.
DCM Data Systems Ltd. had a number of software products. One
of the newly developed products, vi editor, was installed locally and
abroad.
Reports and surveys depicted that some of the program
functionality claimed did not adequately function. The management of
the company then handed over the project to an ISO certified CMM
level 5 company, KRV&V. KRV&V decided to use the TPA method
to estimate black-box testing effort.
10.1. METHODOLOGY
Weights:
ii. Usage intensity (Ui): It depicts how many users process a function
and how often.
Weights:
iii. Interfacing (I): It implies how much one function affects the other
parts of the system. The degree of interfacing is determined by
first ascertaining the logical data sets (LDSs) which the function in
question can modify, then the other functions which access these
LDSs. An interface rating is assigned to a function by reference to
a table in which the number of LDSs affected by the function are
arranged vertically and the number of the other functions accessing
LDSs are arranged horizontally. When working out the number of
“other functions” affected, a given function may be counted
several times if it accesses several LDSs, all of which are
maintained by the function for which the calculation is being
made.
Weights:
Conditions:
When counting the conditions, only the processing algorithm
should be considered.
Conditions which are the results of database checks such as
domain validations or physical presence checks do not count
because these are implicitly included in FPA.
Composite conditions such as “IF a AND b, THEN” have C = 2
because without the AND statement we would need 2 IF
statements.
A CASE statement with “n” cases have complexity = (n – 1)
because the replacement of the CASE statement with n cases
counts as (n – 1) conditions.
Count only the simple conditions and not the operators for
calculating complexity (C).
Weights:
Weights:
i ← 1 to 4
PF value Description
0.7 If test team is highly skilled
2.0 If test team has insufficient skills
Step 5: Environmental factor (EF):
The number of test hours required for each test point is not only
influenced by PF but also by the environmental factor.
EF includes a number of environmental variables.
The following EFs might affect the testing effort:
a. Test tools: It reflects the extent to which the testing is
automated, i.e., how much of the primary testing activities
employ automatic tools for testing.
Rating:
Rate Description
1 Testing involves the use of SQL, record, and
playback tool. These tools are used for test
specification and testing.
2 Testing involves the use of SQL only. No record and
playback tool is being used. Tools are used for test
specification and testing.
4 No testing tools are available.
Ratings:
Rate Description
2 A development testing plan is available and the
testing team is familiar with the actual test cases and
results.
4 If development testing plan is available.
8 If no development testing plan is available.
c. Test basis: The test basis variable reflects the quality of
documentation upon which the test under consideration is
based. This includes documents like SRS, DFD, etc. The more
detailed and higher quality the documentation is, the less time
is necessary to prepare for testing (preparation and
specification phases).
Ratings:
Rate Description
3 Documentation standards and documentation
templates are used, inspections are carried out.
6 Documentation standards and documentation
templates are used.
12 No documentation standards and templates are used.
Ratings:
Rate Description
2 System was developed in 4GL programming
language with integrated DBMS.
4 System was developed using 4GL and 3GL
programming language.
8 System was developed using only 3GL programming
language such as COBOL and PASCAL.
Ratings:
Rate Description
1 Environment has been used for testing several times
in the past.
2 Test environment is new but similar to earlier used
environment.
4 Test environment is new and setup is experimental.
Ratings:
Rate Description
1 A usable, general initial data set and specified test
cases are available for test.
2 Usable, general initial data set available.
4 No usable testware is available.
Team Size (T): This factor reflects the number of people making up
the team, i.e., test manager, test controller, test contractors, and part-
time testers. The bigger the team, the more effort it will take to
manage the project.
Ratings:
Rate Description
3 The team consists of up to 4 persons.
6 The team consists of up to 5 and 10 persons.
12 The team consists of more than 10 persons.
Ratings:
Rate Description
2 Both an automated time registration system and
automated defect tracking system are available.
4 Either an automated time registration system or
automated defect tracking system is available.
8 No automated systems are available.
Phase Estimate
I. Planning and control THA
II. Preparation 10%
V. Completion 5%
where
Rating on test tools = 1
Rating on development testing = 4
Rating on test basis = 6
Rating on development environment = 2
Rating on test environment = 2
Rating on testware = 2
Each use case has only one start and can have multiple end points.
Using UML terminology, the start is indicated by a plain circle and a
circle with a dot inside indicates the end.
In order to draw a diagram for the use case the following steps
should be followed:
1. Draw the basic flow.
Identify nodes
Combine sequential steps into one branch
Annotate the branches with the text summarizing the action in
those branches
Connect the nodes indicating the direction of flow
2. Repeat the step above for each alternate and exception flow.
The complete step-by-step process is illustrated in the attached
diagram at Figure B. The use-case example of Figure A has been
used to illustrate the process. As explained above, the flow diagram
is an excellent tool to identify the use-case flow and other problems
in the early stages. This feature of the process can save lot of time
and effort in the earlier stages of the software process. Figure 10.3
also covers how to identify use-case problems and then correcting
them early in the software process.
Now this is a happy day path but as we know there may be certain
minimum and maximum amounts that a user can withdraw from the
ATM. Let us say it is $10 and $500, respectively. In order to
adequately test this path using boundary value analysis (BVA), we
need to test this withdrawal for $10, $500, and $200 (middle). Thus,
we need to create 3 test scenarios for the same path.
FIGURE 10.3 Relationship Between Path and Scenario.
The point to note here is that all three scenarios have the exact
same path through the use case. Why not test <$10 and >$500
withdrawal in the same path? The reason we do not do it is that such
tests belong to a different path where a “user” tries to withdraw <$10
or >$500 and he gets an appropriate message and the user is prompted
to reenter an acceptable amount. The user reenters the correct amount
and the system then lets the user withdraw the money.
The following guidelines should be followed to create test cases:
1. Create one test case for each path that has been selected for testing.
As explained previously, the path description provides enough
information to write a proper test case.
2. Create multiple test scenarios within each test case. We
recommend using data tables that have data elements as rows and
each column is a data set and also a test scenario. See Appendix B
where this is explained with reference to the example.
3. Add GUI details in the steps, if necessary.
Preconditions:
1. The registrar must be logged on the system (Use Case: Login).
2. System offers registrar choices: Add, Delete, and Modify.
Basic Course:
1. Registrar chooses to add a student in the system.
Alternate Course: Delete Student
Alternate Course: Modify Student
2. Registrar enters the following information:
Name
DOB
SS#
Status
Graduation Date
3. Registrar confirms the information.
4. System returns an unique ID number for the student.
Post Conditions: System displays the list of students with the
selection of new student that have been added.
Alternate Courses:
Delete Student:
1. At basic course Step 1, instead of selecting to Add a student,
registrar selects to Delete a student.
2. System requests the student ID.
3. Registrar enters student ID. Alternate Course: Invalid Student ID.
4. System displays the student information.
5. System prompts the registrar to confirm the student deletion.
Alternate Course: Cancel Delete.
6. Registrar verifies the decision to delete.
7. System deletes the student from the system.
Post Conditions: Student name and other data no longer displayed to
the user.
Modify Student:
1. At basic course Step 1, instead of selecting to Add a student,
registrar selects to Modify a student.
2. System requests the student ID.
3. Registrar enters student ID. Alternate Course: Invalid Student ID.
4. System displays the student information.
5. Registrar changes any of the student attributes. Alternate Course:
Cancel Modify.
6. Registrar confirms the modification.
7. System updates the student information.
Post Conditions: Student is not deleted from the system.
Cancel Modify:
1. At Step 5 of alternate course Modify, instead of confirming the
deletion, registrar decides not to modify the student.
2. System cancels the modify.
3. Return to Step 1 of basic course.
Post Condition: Student information is not modified.
Invalid ID:
1. At Step 3 of alternate courses (Delete/Modify), system determines
that the student ID is invalid. (Collaboration case validate student
ID.)
2. System displays a message that the student ID is invalid.
3. Registrar chooses to reenter student ID.
4. Go to Step 1 of Modify/Delete course.
Post Condition: Student not deleted/student information is not
modified.
We follow all the steps for the use case of Figure A above.
10. Connect the nodes within each alternate course. Arrows should
show direction of the flow.
11. Annotate branches as before.
12. Repeat Steps 5 to 10 for other alternate or exception courses.
Correct the use case and the flow diagram by showing two more
nodes. The node is also a point where two or more flows meet.
Path Selection
Note: In a large number of cases, you will probably be testing all use-
case paths. The prioritization process helps you in selecting critical or
more important paths for testing.
SUMMARY
In our opinion, one of the most difficult and critical activities in IT is
the estimation process. We believe that it occurs because when we say
that one project will be accomplished in a certain amount of time by a
certain cost, it must happen. If it does not happen, several things may
follow: from peers’ comments and senior management’s warnings to
being fired depending on the reasons and seriousness of the failure.
Before even thinking of moving to systems test at our
organization, we always heard from the development group members
that the estimations made by the systems test group were too long and
expensive. We tried to understand the testing estimation process.
The testing estimation process in place was quite simple. The
inputs for the process provided by the development team were the size
of the development team and the number of working days needed for
building a solution before starting systems tests.
The testing estimation process said that the number of testing
engineers would be half of the number of development engineers and
one-third of the number of development working days.
A spreadsheet was created in order to find out the estimation and
calculate the duration of tests and testing costs. They are based on the
following formulas:
Testing working = (Development working days)/3
days
Testing engineers = (Development engineers)/2
Testing costs = Testing working days * Testing engineers *
Person daily costs
As the process was only playing with numbers, it was not necessary to
register anywhere how the estimation was obtained.
To show how the process worked, if one development team said
that to deliver a solution for systems testing it would need 4 engineers
and 66 working days, then the systems test would need 2 engineers
(half) and 21 working days (one-third). So the solution would be ready
for delivery to the customer after 87 (66 + 21) working days.
Just to be clear, in testing time the time for developing the test
cases and preparing the testing environment was not included.
Normally, it would need an extra 10 days for the testing team.
Besides being simple, that process worked fine for different
projects and years. But, we were not happy with this approach and the
development group were not either. Metrics, project analogies,
expertise, and requirements, were not being used to support the
estimation process.
We mentioned our thoughts to the testing group. We could not
stand the estimation process for very long. We were not convinced to
support it any more. Then some rules were implemented in order to
establish a new process.
Those rules are being shared below. We know that they are not
complete and it was not our intention for estimating but, for now, we
have strong arguments to discuss our estimation when someone doubts
our numbers.
The Rules:
First Rule: Estimation should be always based on the software
requirements:
All estimation should be based on what would be tested, i.e., the
software requirements.
Normally, the software requirements were only established by the
development team without any or just a little participation from the
testing team. After the specifications have been established and the
project costs and duration have been estimated, the development team
asks how long it would take for testing the solution. The answer
should be said almost right away.
Then the software requirements should be read and understood by
the testing team, too. Without the testing participation, no serious
estimation can be considered.
Second Rule: Estimation should be based on expert judgement:
Before estimating, the testing team classifies the requirements in the
following categories:
Critical: The development team has little knowledge in how to
implement it.
High: The development team has good knowledge in how to
implement it but it is not an easy task.
Normal: The development team has good knowledge in how to
implement.
The experts in each requirement should say how long it would take for
testing them. The categories would help the experts in estimating the
effort for testing the requirements.
Third Rule: Estimation should be based on previous projects:
All estimation should be based on previous projects. If a new project
has similar requirements from a previous one, the estimation is based
on that project.
Fourth Rule: Estimation should be based on metrics:
Our organization has created an OPD (organization process database)
where the project metrics are recorded. We have recorded metrics
from three years ago obtained from dozens of projects.
The number of requirements is the basic information for estimating
a testing project. From it, our organization has metrics that guide us to
estimate a testing project. The table below shows the metrics used to
estimate a testing project. The team size is 01 testing engineer.
Metric Value
1. Number of testcases created for each 4,53
requirement
2. Number of testcases developed by working 14,47
day
3. Number of testcases executed by working day 10,20
4. Number of ARs for testcase 0,77
5. Number of ARs verified by working day 24,64
Metric Value
Number of testcases – based on metric 31,710
1
Preparation phase – based on metric 2 11 working days
Execution phase – based on metric 3 16 working days
Number of ARs – based on metric 4 244 ARs
Regression phase – based on metric 5 6 working days
ANSWERS
1. b.
2. c.
3. a.
4. b.
5. a.
6. d.
7. a.
REVIEW QUESTIONS
1. What are the three main inputs to a TPA process? Explain.
2. With a flowchart explain the TPA model.
3. Explain the test points of some standard functions.
4. “The bigger the team, the more effort it will take to manage the
project.” Comment.
5. Write short paragraphs on:
a. Testware
b. Planning and control tools
CHAPTER
11
11.0. ABSTRACT
Today everyone depends on websites for business, education, and
trading purposes. Websites are related to the Internet. It is believed
that no work is possible without Internet today. There are many types
of users connected to websites who need different types of
information. So, websites should respond according to the user
requirements. At the same time, the correct behavior of sites has
become crucial to the success of businesses and organizations and thus
should be tested thoroughly and frequently. In this chapter, we are
presenting various methods (functional and non-functional) to test a
website. However, testing a website is not an easy job because we
have to test not only the client-side but also the server-side. We
believe our approach will help any website engineer to completely test
a website with a minimum number of errors.
11.1 INTRODUCTION
The client end of the system is represented by a browser which
connects to the website server via the Internet. The centerpiece of all
web applications is a relational database which stores dynamic
contents. A transaction server controls the interactions between the
database and other servers (often called “application servers”). The
administration function handles data updates and database
administration.
6. Testing: 6. Testing:
Have we tested the product in a It’s just a website — the designer
reproducible and consistent manner? will test it as (s)he develops it, right?
Have we achieved complete test How do you test a website? Make
coverage? Have all serious defects sure the links all work?
been resolved in some manner Testing of implied features based on
Systematic testing of functionality a general idea of desired
against specifications. functionality.
7. Release: 7. Release:
Have we met our acceptance criteria? Go live NOW! We can always add
Is the product stable? Has QA the rest of the features later!
authorized the product for release? Transfer of the development site to
Have we implemented version the live server.
control methods to ensure we can
always retrieve the source code for
this release?
Building a release candidate and
burning it to CD.
8. Maintenance: 8. Maintenance:
What features can we add for a We just publish new stuff when it’s
future release? What bug fixes? How ready...we can make changes on the
do we deal with defects reported by fly, because there’s no installation
the end-user? required. Any changes should be
transparent to our users...”
Periodic updates based on feature Integral part of the extended
enhancements and user feedback. development life cycle for web apps.
Average timeframe for the above: Average timeframe for the above:
One to three years 4 months
11.2. METHODOLOGY
11.2.1. NON-FUNCTIONAL TESTING (OR WHITE-BOX TESTING)
11.2.1.1.CONFIGURATION TESTING
This type of test includes
The operating system platforms used.
The type of network connection.
Internet service provider type.
Browser used (including version).
The real work for this type of test is ensuring that the requirements
and assumptions are understood by the development team, and that
test environments with those choices are put in place to properly test
it.
11.2.1.2.USABILITY TESTING
For usability testing, there are standards and guidelines that have been
established throughout the industry. The end-users can blindly accept
these sites because the standards are being followed. But the designer
shouldn’t completely rely on these standards. While following these
standards and guidelines during the making of the website, he or she
should also consider the learnability, understandability, and operability
features so that the user can easily use the website.
11.2.1.3.PERFORMANCE TESTING
11.2.1.5.SECURITY TESTING
11.2.1.6.RECOVERABILITY TESTING
A website should have a backup or redundant server to which the
traffic is rerouted when the primary server fails. And the rerouting
mechanism for the data must be tested. If a user finds your service
unavailable for an excessive period of time, the user will switch over
or browse the competitor’s website. If the site can’t recover quickly
then inform the user when the site will be available and functional.
11.2.1.7.RELIABILITY TESTING
This type of test covers the objects and code that executes within the
browser but does not execute the server-based components. For
example, JavaScript and VB Script code within HTML that does
rollovers and other special effects. This type of test also includes field
validations that are done at the HTML level. Additionally, browser-
page tests include Java applets that implement screen functionality or
graphical output. The test cases for web browser testing can be derived
as follows:
If all mandatory fields on the form are not filled in then it will
display a message on pressing a submit button.
It will not show the complete information about sensitive data
like full credit card number, social security number (SSN), etc.
Hidden passwords.
Login by the user is a must for accessing the sensitive
information.
It should check the limits of all the fields given in the form.
11.2.2.2.TRANSACTION TESTING
In this testing, test cases are designed to confirm that information
entered by the user at the web page level makes it to the database, in
the proper way, and that when database calls are made from the web
page, the proper data is returned to the user.
SUMMARY
It is clear from this chapter that for the failure-free operation of a
website we must follow both non-functional and functional testing
methods. With these methods one can test the performance, security,
reliability, user interfaces, etc. which are the critical issues related to
the website. Web testing is a challenging exercise and by following
the methods described in this chapter, some of those challenges may
be mitigated.
Inspection Walkthrough
1. It is a five-step process that is 1. It has fewer steps than inspection
well-formalized. and is a less formal process.
2. It uses checklists for locating 2. It does not use a checklist.
errors.
3. It is used to analyze the quality of 3. It is used to improve the quality
the process. of product.
4. This process takes a long time. 4. It does not take a long time.
5. It focuses on training of junior 5. It focuses on finding defects.
staff.
REVIEW QUESTIONS
1. How is website testing different from typical software testing?
2. Discuss various white-box testing techniques for websites.
3. Discuss various black-box testing techniques for websites.
4. Write short paragraphs on:
a. Scalability testing of websites.
b. Transaction testing of websites.
CHAPTER
12
REGRESSION TESTING OF A
RELATIONAL DATABASE
Inside this Chapter:
12.0. Introduction
12.1. Why Test an RDBMS?
12.2. What Should We Test?
12.3. When Should We Test?
12.4. How Should We Test?
12.5. Who Should Test?
12.0. INTRODUCTION
Relational databases are tabular databases that are used to store target
related data that can be easily reorganized and queried. They are used
in many applications by millions of end users. Testing databases
involves three aspects:
Testing of the actual data
Database integrity
Functionality testing of database application
These users may access, update, delete, or append to the database.
The modified database should be error free. To make the database
error free and to deliver the quality product, regression testing of the
database must be done. Regression testing involves retesting of the
database again and again to ensure that it is free of all errors. It is a
relatively new idea in the data community. Agile software developers
take this approach to the application code.
In this chapter, we will focus on the following issues in regression
testing:
Why test an RDBMS?
What should we test?
When should we test?
How should we test?
Who should test?
To this end, the problem will be approached from practical
perspective.
Step 2: Running the test cases: The test cases are run. The running
of the database test cases is analogous to usual development
testing.
Traditional Approach
Test cases are executed on the browser side. Inputs are entered on
web input forms and data is submitted to the back-end database via
the web browser interface. The results sent back to the browser are
then validated against expected values.
Advantages: It is simple and no programming skill is required.
It not only addresses the functionality of stored procedures, rules,
triggers, and data integrity but also the functionality of the web
application as a whole.
Disadvantages: Sometimes the results sent to the browser
after test case execution do not necessarily indicate that the data
itself is properly written to a record in the table. When erroneous
results are sent back to the browser after the execution of test
cases, it doesn’t necessarily mean that the error is a database error.
A crucial danger with database testing and with regression
testing specificly is coupling between tests. If we put the database
in to a known state, run several tests against that known state
before setting it, then those tests are potentially coupled to one
another.
Advanced Approach
Preparation for Database Testing
Generate a list of database tables, stored procedures, triggers,
defaults, rules, and so on. This will help us have a good handle on
the scope of testing required for database testing. The points which
we can follow are:
1. Generate data schemata for tables. Analyzing the schema will
help us determine:
Can a certain field value be Null?
What are the allowed or disallowed values?
What are the constraints?
Is the value dependent upon values in another table?
Will the values of this field be in the look-up table?
What are user-defined data types?
What are primary key and foreign key relationships among
tables?
2. At a high level, analyze how the stored procedures, triggers,
defaults, and rules work. This will help us determine:
What is the primary function of each stored procedure and
trigger? Does it read data and produce outputs, write data,
or both?
What are the accepted parameters?
What are the return values?
When is the stored procedure called and by whom?
When is a trigger fired?
3. Determine what the configuration management process is. That
is how the new tables, stored procedures, triggers, and such are
integrated.
Step 3: Checking the results: Actual database test results and
expected database test results are compared in this step as shown
in the following example:
The following test cases were derived for this code snippet:
12.5. WHO SHOULD TEST?
The main people responsible for doing database testing are application
developers and agile database administrators. They will typically pair
together and will perform pair testing which is an extension of pair
programming. Pair database testing has the following advantages.
First, testing becomes a real-time interaction. Secondly, discussions
are involved throughout.
The database testers are also responsible for procuring database
testing tools for the organization. Some of the dataset testing CASE
tools are:
SUMMARY
In this chapter, we have studied the regression testing of relational
databases. We have also done the black-box testing of a database code
example.
ANSWERS
1. b.
2. c.
3. a.
4. c.
5. a.
6. c.
7. b.
REVIEW QUESTIONS
1. Why should an RDBMS be tested extensively?
2. How can you do black-box testing of a database?
3. What is refactoring? What are its three main objectives?
4. Explain with the help of a flowchart/an algorithm, the Test-First
approach used to test an RDBMS.
5. Comment on the flow of database testing.
6. Name some unit testing and load testing CASE tools and some test
data generators used during database testing.
CHAPTER
13
CHAPTER ONE
INTRODUCTION
CHAPTER TWO
2.1. INTRODUCTION
This document aims at defining the overall software requirements for
“testing of an online learning management system
(www.trpscheme.com).” Efforts have been made to define the
requirements exhaustively and accurately.
2.1.1. PURPOSE
2.1.2. SCOPE
The testing of the resource center section for service tax is done
manually mainly using functional and regression testing. Other forms
of testing may also be used such as integration testing, load testing,
installation testing, etc.
Sites
http://en.wikipedia.org/Software_testing
2.1.5. OVERVIEW
The rest of the SRS document describes the various system
requirements, interfaces, features, and functionalities in detail.
FIGURE 2.1
None.
The terminals at the client site will have to support the hardware and
software interfaces specified in the above sections.
2.2.4. CONSTRAINTS
Validations:
To view this report the user will have to select a “Zone” as well
as a “Period.” These are mandatory filters.
There will be an option of “ALL” in the “Zone” drop down if the
report needs to be generated for all the zones.
The user must click on the “Generate Report” button to view the
report in HTML format or on “Export to Excel” if he or she
wants to export the data into Excel format.
The “Cancel” button will take the user to the login page.
The user needs to fill both “Date from” and “To” fields. “Date
from” and “To” will extract the data based on “Date of Filling
Return.”
The user can either select the “Period” or “Date from” and “To” to
generate the report. Both of the fields cannot be selected.
Zone/Commissionerate Wise Report (Admin Report)
This report will allow the admin to generate the report
Zone/Commissionerate Wise of STRPs. This report will be generated
in HTML format as well as in Excel format.
Validations:
To view the Commissionerate Wise Report data the admin can
provided “Zone,” “Commissionerate,” and “Division” to view the
data but if no input is provided then the data will include the
entire “Zone,” the “Commissionerate,” and the “Division.” The
user will have to select “Zone” because it will be a mandatory
field. There will be an option of “ALL” in the “Zone” drop down
if the report needs to be generated for all of the “Zone.”
“Commissionerate” will be mapped to the “Zone” and “Division”
will be mapped to “Commissionerate,” i.e., if a user selects a
“Zone” then all the “Commissionerate” under that “Zone” will
come in to the “Commissionerate” drop down and if a user
selects a “Commissionerate” then only those “Division” will be
populated in the “Division” drop down that are under that
“Commissionerate.” If any LTU is selected in the “Zone” drop
down the no other field will be populated.
The user must click on the “Generate Report” button to view the
report in HTML format or on “Export to Excel” if he or she
wants to export the data into Excel format.
The “TRP id,” “TRP name,” “Commissionerate,” and “Division”
will also be provided in the Excel sheet.
The “Cancel” button will take the user to the login page.
2.3.2. FUNCTIONS
It defines the fundamental actions that must take place in the software
in accepting and processing the inputs and generating the outputs. The
system will perform the following:
VALIDITY CHECKS
The address should be correct.
An Internet connection should be present.
RESPONSES TO ABNORMAL SITUATIONS
An error message will be generated if the date format is wrong.
An error message will be generated if the STC code is entered
incorrectly.
An error message will be generated if two users are assigned the
same STC code.
2.3.3. MODULES
Test Plan
We write test plans for two very different purposes. Sometimes the
test plan is a product; sometimes it’s a tool. It’s too easy but also too
expensive to confuse these goals. In software testing, a test plan gives
detailed testing information regarding an upcoming testing effort
including:
Scope of testing
Schedule
Test deliverables
Release criteria risks and contingencies
How the testing will be done?
Who will do it?
What will be tested?
How long it will take?
What the test coverage will be, i.e., what quality level is required?
Test Cases
A test case is a set of conditions or variables under which a tester will
determine if a requirement upon an application is partially or fully
satisfied. It may take many test cases to determine that a requirement
is fully satisfied. In order to fully test that all of the requirements of an
application are met, there must be at least one test case for each
requirement unless a requirement has sub requirements. In that
situation, each sub requirement must have at least one test case. There
are different types of test cases.
Common test case
Functional test case
Invalid test case
Integration test case
Configuration test case
Compatibility test case
None.
CHAPTER THREE
SYSTEM DESIGN
CHAPTER FOUR
4.2. TESTING
The importance of software testing and its implications with respect to
software quality cannot be overemphasized. Software testing is a
critical element of software quality assurance and represents the
ultimate review of specification, design, and code generation.
Unit Testing: This is the first phase of testing. The unit test of the
system was performed using a unit test plan. The parameters that are
required to be tested during a unit testing are as follows:
Validation check: Validations are all being performed correctly. For
this, two kinds of data are entered for each entry going into the
database—valid data and invalid data.
Integrating Testing: It is a systematic technique for constructing the
program structure while at the same time conducting tests to uncover
tests associated with interfacing. The objective is to take unit tested
components and build a program structure that has been dictated by
design.
In this testing we followed the bottom-up approach. This approach
implies construction and testing with atomic modules.
Stress Testing: The final test to be performed during unit testing in
the stress test. Here the program is put through extreme stress like all
of the keys of the keyboard being pressed or junk data being put
through. The system being tested should be able to handle that stress.
Functional Testing: Functional testing verifies that your system is
ready for release. The functional tests define your working system in a
useful manner. A maintained suite of functional tests:
Captures user requirements in a useful way.
Gives the team (users and developers) confidence that the system
meets those requirements.
Load Testing: Load testing generally refers to the practice of
modeling the expected usage of a software program by simulating
multiple users accessing the program’s services concurrently. As such,
this testing is most relevant for multi-user systems often one built
using a client/server model, such as web servers.
Regression Testing: Regression testing is initiated after the
programmer has attempted to fix a recognized problem or has added
the source code to a program that may have inadvertently introduced
errors. It is a quality control measure to ensure that the newly modified
code still complies with its specified requirements and that unmodified
code has not been affected by the maintenance activity.
Installation Testing: Installation testing will check the installation
and configuration procedure as well as any missing dependencies.
Installation tests test the installation and configuration procedures.
These tests are a set of scripts that automatically download all
necessary packages and install them. To test that the installation was
successful there is an edge-java-security-test RPM which contains a
simple script to test the SSL handshake with the secure service.
CHAPTER FIVE
TEST CASES
Developers don’t fully test their own games. They don’t have time to,
and even if they did, it’s not a good idea. Back at the dawn of the
video game era, the programmer of a game was also its artist,
designer, and tester. Even though games were very small—the size of
email— the programmer spent most of his time designing and
programming. Little of his time was spent testing. If he did any
testing, it was based on his own assumptions about how players would
play his game. The following sidebar illustrates the type of problem
these assumptions could create.
“BLACK-BOX” TESTING
Almost all game testing is black-box testing, testing done from outside
the application. No knowledge of, or access to, the source code is
granted to the tester. Game testers typically don’t find defects by
reading the game code. Rather, they try to find defects using the same
input devices available to the average player, be it a mouse, a
keyboard, a console gamepad, a motion sensor, or a plastic guitar.
Black-box testing is the most cost-effective way to test the extremely
complex network of systems and modules that even the simplest video
game represents.
Figure 14.1 illustrates some of the various inputs you can provide
to a videogame and the outputs you can receive back. The most basic
of inputs are positional, and control data in the form of button presses
and cursor movements, or vector inputs from accelerometers, or even
full-body cameras. Audio input can come from microphones fitted in
headsets or attached to a game controller. Input from other players can
come from a second controller, a local network, or the Internet.
Finally, stored data such as saved games and options settings can be
called up as input from memory cards or a hard drive.
Once some or all of these types of input are received by the game,
it reacts in interesting ways and produces such output as video, audio,
vibration (via force feedback devices), and data saved to memory
cards or hard drives.
The input path of a video game is not oneway, however. It is a
feedback loop, where the player and the game are constantly reacting
to each other. Players don’t receive output from a game and stop
playing. They constantly alter and adjust their input “on the fly,” based
on what they see, feel, and hear in the game. The game, in turn, makes
similar adjustments in its outputs based on the inputs it receives from
the player. Figure 14.2 illustrates this loop.
“WHITE-BOX” TESTING
Four white-box tests are required for this module to test the proper
behavior of each line of code within the module. The first test would
be to call the TeamName function with the parameter TEAM_AXIS and
then check that the string “RED” is returned. Second, pass the value of
TEAM_ALLIES and check that “BLUE” is returned. Third, pass
TEAM_SPECTATOR and check that “SPECTATOR” is returned. Finally, pass
some other value such as TEAM_NONE, which makes sure that “FREE” is
returned. Together these tests not only exercise each line of code at
least once, they also test the behavior of both the “true” and “false”
branches of each if statement.
This short exercise illustrates some of the key differences between
a white-box testing approach and a black-box approach:
Black-box testing should test all of the different ways you could
choose a test value from within the game, such as different menus
and buttons. White-box testing requires you to pass that value to
the routine in one form—its actual symbolic value within the
code.
By looking into the module, white-box testing reveals all of the
possible values that can be provided to and processed by the
module being tested. This information might not be obvious from
the product requirements and feature descriptions that drive
black-box testing.
Black-box testing relies on a consistent configuration of the game
and its operating environment in order to produce repeatable
results. White-box testing relies only on the interface to the
module being tested and is concerned only about external files
when processing streams, file systems, or global variables.
Game testers are often frustrated that, like players, they must wait (and
wait) for the work product of the development team before they can
spring into action. Players wait for game releases; testers wait for code
releases, or builds. The test results from each build is how all
stakeholders in the project—from QA to the project manager to the
publisher—measure the game’s progress toward release.
A basic game testing process consists of the following steps:
1. Plan and design the test. Although much of this is done early in
the planning phase, planning and design should be revisited with
every build. What has changed in the design spec since the last
build? What additional test cases have been added? What new
configurations will the game support? What features have been
cut? The scope of testing should ensure that no new issues were
introduced in the process of fixing bugs prior to this release.
2. Prepare for testing. Code, tests, documents, and the test
environment are updated by their respective owners and aligned
with one another. By this time the development team should have
marked the bugs fixed for this build in the defect database so the
QA team can subsequently verify those fixes and close the bugs.
3. Perform the test. Run the test suites against the new build. If you
find a defect, test “around” the bug to make certain you have all
the details necessary to write as specific and concise a bug report
as possible. The more research you do in this step, the easier and
more useful the bug report will be.
4. Report the results. Log the completed test suite and report any
defects you found.
5. Repair the bug. The test team participates in this step by being
available to discuss the bug with the development team and to
provide any directed testing a programmer might require to track
the defect down.
6. Return to Step 1 and re-test. With new bugs and new test results
comes a new build.
These steps not only apply to black-box testing, they also describe
white-box testing, configuration testing, compatibility testing, and any
other type of QA. These steps are identical no matter what their scale.
If you substitute the word “game” or “project” for the word “build” in
the preceding steps, you will see that they can also apply to the entire
game, a phase of development (Alpha, Beta, and so on), or an
individual module or feature within a build. In this manner, the
software testing process can be considered fractal—the smaller system
is structurally identical to the larger system, and vice versa.
As illustrated in Figure 14.3, the testing process itself is a feedback
loop between the tester and developer. The tester plans and executes
tests on the code, then reports the bugs to the developer, who fixes
them and compiles a new build, which the tester plans and executes,
and so on.
This is a very small portion of a very simple test suite for a very
small and simple game. The first section (steps one through seven)
tests launching the game, ensuring that the default display is correct,
and exiting. Each step either gives the tester one incremental
instruction or asks the tester one simple question. Ideally, these
questions are binary and unambiguous. The tester performs each test
case and records the result.
Because the testers will inevitably observe results that the test
designer hadn’t planned for, the Comments field allows the tester to
elaborate on a Yes/No answer, if necessary. The lead or primary tester
who receives the completed test suite can then scan the Comments
field and make adjustments to the test suite as needed for the next
build.
Where possible, the questions in the test suite should be written in
such a way that a “yes” answer indicates a “pass” condition—the
software is working as designed and no defect is observed. “No”
answers, in turn, should indicate that there is a problem and a defect
should be reported. There are several reasons for this: it’s more
intuitive, because we tend to group “yes” and “pass” (both positives)
together in our minds the same way we group “no” and “fail.” Further,
by grouping all passes in the same column, the completed test suite
can be easily scanned by both the tester and test managers to
determine quickly whether there were any fails. A clean test suite will
have all the checks in the Pass column.
For example, consider a test case covering the display of a tool tip
—a small window with instructional text incorporated into many
interfaces. A fundamental test case would be to determine whether the
tool tip text contains any typographical errors. The most intuitive
question to ask in the test case is:
Does the text contain any typographical errors?
The problem with this question is that a pass (no typos, hence no
bugs) would be recorded as a “no.” It would be very easy for a hurried
(or tired) tester to mistakenly mark the Fail column. It is far better to
express the question so that a “yes” answer indicates a “pass”
condition:
Is the text free of typographical errors?
As you can see, directed testing is very structured and methodical.
After the directed testing has concluded, or concurrently with directed
testing, a less structured, more intuitive form of testing, known as ad
hoc testing, takes place.
Entry Criteria
It’s advisable to require that any code release meets some criteria for
being fit to test before you risk wasting your time, or your team’s time,
testing it. This is similar to the checklists that astronauts and pilots use
to evaluate the fitness of their vehicle systems before attempting flight.
Builds submitted to testing that don’t meet the basic entry criteria are
likely to waste the time of both testers and programmers. The
countdown to testing should stop until the test “launch” criteria are
met.
The following is a list of suggestions for entry criteria. Don’t keep
these a secret from the rest of the development team. Make the team
aware of the purpose—to prevent waste—and work with them to
produce a set of criteria that the whole team can commit to.
The game code should be built without compiler errors. Any new
compiler warnings that occur are analyzed and discussed with the
test team.
The code release notes should be complete and should provide the
detail that testers need to plan which tests to run or to re-run for
this build.
Defect records for any bugs closed in the new release should be
updated so they can be used by testers to make decisions about
how much to test in the new build.
Tests and builds should be properly version-controlled, as
described in the sidebar, “Version Control: Not Just for
Developers.”
When you are sufficiently close to the end of the project, you also
want to receive the game on the media on which it will ship.
Check that the media provided contains all of the files that would
be provided to your customer.
VERSION CONTROL: NOT JUST FOR DEVELOPERS
A fundamental principle of software development is that every build
of an application should be treated as a separate and discrete version.
Inadvertent blending of old code with new is one of the most common
(and most preventable) causes of software defects. The process of
tracking builds and ensuring that all members of a development team
are checking current code and assets into the current version is known
as version control.
Test teams must practice their own form of version control. There
are few things more time wasting than for a test team to report a great
number of bugs in an old build. This is not only a waste of time, but it
can cause panic on the part of the programmer and the project
manager.
Proper version control for the test team includes the following
steps:
1. Collect all prior physical (e.g., disk-based) builds from the test
team before distributing the new build. The prior versions should
be staked together and archived until the project is complete.
(When testing digital downloads, uninstall and delete or archive
prior digital builds.)
2. Archive all paperwork. This includes not only any build notes you
received from the development team, but also any completed test
suites, screen shots, saved games, notes, video files, and any other
material generated during the course of testing a build. It is
sometimes important to retrace steps along the paper trail, whether
to assist in isolating a new defect or determining in what version an
old bug was re-introduced.
3. Verify the build number with the developer prior to distributing it.
4. In cases where builds are transmitted electronically, verify the byte
count, file dates, and directory structure before building it. It is
vital in situations where builds are sent via FTP, email, Dropbox
(www.dropbox.com) or other digital means that the test team makes
certain to test a version identical to the version the developers
uploaded. Confirm the integrity of the transmitted build before
distributing it to the testers.
5. Renumber all test suites and any other build-specific paperwork or
electronic forms with the current version number.
6. Distribute the new build for smoke testing.
Configuration Preparation
Before the test team can work with the new build, some housekeeping
is in order. The test equipment must be readied for a new round of
testing. The test lead must communicate the appropriate hardware
configuration to each tester for this build. Configurations typically
change little over the course of game testing. To test a single-player-
only console game, you need the game console, a controller, and a
memory card or hard drive. That hardware configuration typically will
not change for the life of the project. If, however, the new build is the
first in which network play is enabled, or a new input device or PC
video card has been supported, you will perhaps need to augment the
hardware configuration to perform tests on that new code.
Perhaps the most important step in this preparation is to eliminate
any trace of the prior build from the hardware. “Wiping” the old build
of a disk-based game on a Nintendo Wii™ is simple, because the only
recordable media for that system is an SD card or its small internal
flash memory drive. All you have to do is remove and archive the
saved game you created with the hold build. More careful test leads
will ask their testers to go the extra step of reformatting the media,
which completely erases it, to ensure that not a trace of the old build’s
data will carry forward during the testing of the new build.
TIP
Testing takes place in the lab and labs should be clean. So should
test hardware. It’s difficult to be too fastidious or paranoid when
preparing test configurations. When you get a new build, reformat
your PC rather than merely uninstall the new build.
TIP
The next step after accepting a new build and preparing to test it is to
certify that the build is worthwhile to submit to formal testing. This
process is sometimes called smoke testing, because it’s used to
determine whether a build “smokes” (malfunctions) when run. At a
minimum, it should consisted of a “load & launch,” that is, the lead or
primary tester should launch the game, enter each module from the
main menu, and spend a minute or two playing each module. If the
game launches with no obvious performance problems and each
module implemented so far loads with no obvious problems, it is safe
to certify the build, log it, and duplicate it for distribution to the test
team.
Now that the build is distributed, it’s time to test for new bugs,
right? Not just yet. Before testing can take a step forward, it must first
take a step backward and verify that the bugs the development team
claims to have fixed in this build are indeed fixed. This process is
known as regression testing.
Regression Testing
Each tester will take the bugs they’ve been assigned and perform
the steps in the bug write-up to verify that the defect is indeed fixed.
The fixes for many defects are easily verified (typos, missing features,
and so on). Some defects, such as hard-to-reproduce crashes, could
seem fixed, but the lead tester might want to err on the side of caution
before he closes the bug. By flagging the defect as verify fix, the bug
can remain in the regression set (i.e., stay on the knockdown list) for
the next build (or two), but out of the set of open bugs that the
development team is still working on. Once the bug has been verified
as fixed in two or three builds, the lead tester can then close the bug
with more confidence.
At the end of regression testing, the lead tester and project
manager can get a very good sense of how the project is progressing.
A high fix rate (number of bugs closed divided by the number of bugs
claimed to have been fixed) means the developers are working
efficiently. A low fix rate could be cause for concern. Are the
programmers arbitrarily marking bugs as fixed if they think they’ve
implemented new code that might address the defect, rather than
troubleshooting the defect itself? Are the testers not writing clear
bugs? Is there a version control problem? Are the test systems
configured properly? While the lead tester and project manager mull
over these questions, it’s time for you to move on to the next step in
the testing process: performing structured tests and reporting the
results.
The old saying in carpentry is “measure twice, cut once.” Good game
testers thoroughly investigate a defect before they write it up,
anticipating any questions the development team might have.
Before you begin to write a defect report, ask yourself some
questions:
1. Is this the only location or level where the bug occurs?
2. Does the bug occur while using other characters or units?
3. Does the bug occur in other game modes (for example, multiplayer
as well as single player, skirmish as well as campaign)?
4. Can I eliminate any steps along the path to reproducing the bug?
5. Does the bug occur across all platforms (for example, does it occur
on both the Xbox One and PlayStation 4 builds)?
6. Is the bug machine-specific (for example, does it occur only on
PCs with a certain hardware configuration)?
These are the types of questions you will be asked by the lead
tester, project manager, or developer. Try to develop the habit of
second-guessing such questions by performing some quick additional
testing before you write the bug. Test to see whether the defect occurs
in other areas. Test to determine whether the bug happens when you
choose a different character. Test to check which other game modes
contain the issue. This practice is known as testing “around” the bug.
Once you are satisfied that you have anticipated any questions that
the development team might ask, and you have all your facts ready,
you are finally ready to write the bug report.
Good bug writing is one of the most important skills a tester must
learn. A defect can be fixed only if it is communicated clearly and
effectively. One of the oldest jokes in software development goes
something like this:
Q: How many programmers does it take to screw in a light bulb?
A: None—it’s not dark where they’re sitting.
Good bug report writing gets the development team to “see the
light” of the bug. The developers are by no means the only people who
will read your bug, however. Your audience could include:
The lead tester or primary tester, who might wish to review the
bug before she gives it an “open” status in the bug database.
The project manager, who will read the bug and assign it to the
appropriate member of the development team.
Marketing and other business executives, who might be asked to
weigh in on the possible commercial impact of fixing (or not
fixing) the bug.
Third parties, such as middleware developers, who could be
asked to review a bug that is possibly related to a project they
supply to the project team
Customer service representatives, who might be asked to devise
workarounds for the bug
Other testers, who will reproduce the steps if they are asked to
verify a fix during regression testing
Because you never know exactly who will be reading your bug
report, you must always write in as clear, objective, and dispassionate
a manner as possible. You can’t assume that everyone reading your
bug report will be as familiar with the game as you are. Testers spend
more time in the game—exploring every hidden path, closely
examining each asset—than almost anyone else on the entire project
team. A well-written bug will give a reader who is not familiar with
the game a good sense of the type and severity of the defect it
describes.
TIP
Before you begin to write a bug report, you have to be certain that you
have all your facts.
Brief Description
This is a run-on sentence that contains far too much detail. A good
way to boil it down might be
Game crashes after killing respawned guards.
TIP
Write the full description first, and then write the brief description.
Spending some time polishing the full description will help you
understand the most important details to include in the brief
description.
Full Description
The fewer steps, the better; and the fewer words, the better.
Remember Brad Pitt’s warning to Matt Damon in Ocean’s Eleven:
don’t use seven steps when four will do. Time is a precious resource
when developing a game. The less time it takes a programmer to read,
reproduce, and understand the bug, the more time he has to fix it.
1. Launch game.
2. Choose multiplayer.
3. Choose skirmish.
4. Choose “Sorrowful Shoals” map.
5. Choose two players.
6. Start game.
These are very clear steps, but for the sake of brevity they can be
boiled down to
This might seem like many steps, but it is the quickest way to
reproduce the bug. Every step is important to isolate the behavior of
the mugging code. Even small details, like meeting in a neutral place,
are important, because meeting in occupied territory might bring allied
units from one side or another into the fight, and the test might then be
impossible to perform.
TIP
Great Expectations
Oftentimes, the defect itself will not be obvious from the steps in the
full description. Because the steps produce a result that deviates from
player expectation, but does not produce a crash or other severe or
obvious symptom, it is sometimes necessary to add two additional
lines to your full description: Expected Result and Actual Result.
FIGURE 14.5 Fallout 4: One would expect player-placed structures
to appear grounded on the terrain rather than floating
above it.
Although the game loaded a map, it wasn’t the map the tester
chose with the keyboard (the last input device he used). That’s a bug,
albeit a subtle one. Years of precedent creates the expectation in the
player’s mind that the computer will execute a command based on the
last input the player gave. Because the map-choosing interface failed
to conform to player expectation and precedent, it could be confusing
or annoying, so it should be written up as a bug.
Use the Expected/Actual Result steps sparingly. Much of the time,
defects are obvious (see Figure 14.5) Here’s an example of “stating
the obvious” in a crash bug.
4. Choose “Next” to continue.
Expected Result: You continue.
Actual Result: Game locks up. You must reboot the
console.
INTERVIEW
More players are playing games than ever before. As any human
population grows—and the pool of game players has grown
exponentially over the last decade—that population becomes more
diverse. Players are different from each other, have different levels of
experience with games, and play games for a range of different
reasons. Some players want a competitive experience, some an
immersive experience, some want a gentle distraction.
The pool of game testers in any organization is always less diverse
than the player base of the game they are testing. Game testers are
professionals, they have skills in manipulating software interfaces,
they are generally (but not necessarily) experienced game players. It’s
likely that if your job is creating games, that you’ve played video
games—a lot of them. But not every player is like you.
Brent Samul, QA Lead for developer Mobile Deluxe, put it this
way: “The biggest difference when testing for mobile is your
audience. With mobile you have such a broad spectrum of users.
Having played games for so long myself, it can sometimes be really
easy to overlook things that someone who doesn’t have so much
experience in games would get stuck on or confused about.”
It’s a big job. “With mobile, we have the ability to constantly
update and add or remove features from our games. There are always
multiple things to test for with all the different configurations of
smartphones and tablets that people have today,” Mr. Samul says.
Although testers should write bugs against the design
specification, the authors of that specification are not omniscient. As
the games on every platform become more and more complex, it’s the
testers’ job to advocate for the players—all players—in their bug
writing. (Permission Brent Samul)
Habits to Avoid
EXERCISES
Table of Contents
SECTION I: QA TEAM (and areas of responsibility)
1. QA Lead
a. Office phone
b. Home phone
c. Mobile phone
d. Email / IM / VOIP addresses
2. Internal Testers
3. External Test Resources
Description Tools
Functional/Regression Testing WinRunner
Silkiest
Quick Test Pro (QTP)
Rational Robot
Visual Test
In-house Scripts
Load/Stress Testing (Performance) LoadRunner
Astra Load Test
Application Centre Test (ATC)
In-house Scripts
Web Application Stress Tool
(WAS)
Test Case Management Test Director
Test Manager
In-house Test Case Management
tools
Defect Tracking TestTrack Pro
Bugzilla
Element Tool
ClearQuest
TrackRecord
In-house Defect Tracking tools of
clients
Unit/Integration Testing C++ Test
JUnit
NUnit
PhpUnit
Check
Cantata++
APPENDIX
B
SUGGESTED PROJECTS
1. ONLINE CHATTING
Develop a Software package that will act as an online community,
which you can use to meet new friends using voice, video, and text.
The community has rooms for every interest, where people can
communicate by using real-time multi-point video, text, and voice in
“calls.” The package should also have video and voice instant
Messages with different colour, fonts, and overlays to choose from, or
you can participate in a real-time text chat room.
Also incorporate broadcast, where one host shares his/her video,
voice, and text chat with up to ten other viewers. Everyone involved in
the broadcast can communicate with text chat. Also add the option of
profiles; wherein each community member has the opportunity to post
a picture and some optional personal information that can be accessed
from the directory by any other community member.
4. WEB LOADER
Design a software package, named Web Loader, that enables you to
download Web sites quickly to your local drive and navigate offline. It
uses project files to store lists of sites and includes several project files
ready to use. Web Loader should include predefined filters to
download a complete site, a directory (and all subdirectories in it), a
page. One may be able to define ones own customised filter by levels,
external links, directories, include/exclude links, external images,
wildcards, and so on. The tool should be able to download up to 100
files simultaneously. It should also print an entire site or only specific
parts of it. The tool should offer support that allow to specify an
account name and password to access secure Web sites.
5. WEB CATCHER
Design a multipurpose software package, Web Catcher, that allows
you to capture Web pages and store on the hard disk for offline
viewing. The tool should create photo albums, greeting cards, etc.
Package any item created or captured in a special format so that it can
be emailed from within the program using your personal email
account Develop a drop-down menu that records the addresses from
any open browser window, allowing to easily select which pages to
download. Also specify the link depth of each capture. The Web
Catcher engine should be able to capture different file formats and
Web-based publishing languages.
6. WEATHER MATE
Develop a software package that receives up-to-date weather
information on your desktop from the Internet. Retrieve weather
forecasts from hundreds of major cities in countries around the world.
You can also generate assorted full-color weather maps. Configure
Weather Mate to update weather information at set intervals, and
resides in the system tray. The system tray icon changes to reflect the
current weather. Also add the feature “Speak Forecast” option using
Microsoft Agent 2.0, which allows you to have your local or extended
forecast read to you.
7. PARTY PLANNER
With Party Planner, you can create guest lists for parties, weddings,
banquets, reunions, and more. You can also assign meals and plan
seating arrangements. You can have up to 1,000 guests with 100 on a
reserve list, plan ten different meals, and arrange up to 99 tables (with
upto 50 guests at each). You can print several different reports for all
of these lists.
8. SMILING JOKER
Develop a software package, Smiling Joker, which uses text-to-speech
and voice recognition technology to make it fully interactive. It should
be able to tell you jokes, useless facts, and even sing to you. It also has
a built in calendar, which it uses to remind you of appointments,
birthdays, due dates, or anything else you want it to remind you about.
It should also have the ability to read aloud your email, Web page, or
anything else you want it to read.
9. MYTOOL
Prepare a project, named MyTool, which is an all-in-one desktop and
system utility program. Its features include an easy-to-use personal
calendar that helps you manage your daily events and can remind you
of important events in a timely manner. You can create quick notes on
your desktop with the embedded WordPad applet. Schedule events,
shut down Windows, down load software, and more, all automatically
at intervals you set.
10. TIMETRAKER
Track the time using your computer. Set alarms for important
appointments, lunch, and so on. Sum the time spent on projects
weekly, monthly, yearly, and do much more.
17. FEECHARGER
Translators, language professionals, and international writers charge
based upon the number of words, lines, and/or characters in the
documents they handle. They need to check the currency conversion
rates very frequently. They go online, find and calculate the current
rate. Design a tool that does all this.
19. PROTECT PC
Develop a software tool, named Protect PC, which locks and hides
desired folders, files, data, and applications. The tool should provide a
user-friendly solution for security and privacy. It should have the
security and privacy of 128-bit encryption. Also have the feature so
that hackers cannot find encrypted files. Also provide Network, FDD,
and CD-ROM Locking functions, and a Delete function for List of
Recent Documents and Windows Explorer.
24. FAXMATE
Design a software tool, FaxMate, which creates, sends, and receives
faxes. The incoming faxes should be announced by customizing the
program with sound file. Include a library of cover sheet templates,
and provide a phone number database for frequently used numbers.
Use the latest fax technology, including fax-modem autodetection.
30. TAXMASTER
Develop a software package, named TaxMaster, which helps to
complete income tax and sales tax returns. It should make available all
the rules, forms, schedules, worksheets and information available in
the US scenario to complete the tax forms. The tool should calculate
returns for the user, then review the return and send alert for possible
errors. It should provide the facility to file the return electronically or
print a paper return, so your tool should be available on the Web.
34. METRIC
Study and define metrics for any of the programming languages
Java/C++/C/Perl/Visual Basic. Develop a software tool, called Metric,
which determines the source code and McCabe metrics for these
languages.
35. FUNCTIONPTESTIMATOR
Study the function point method for size estimation for software
projects. Design a software package, named FunctionPtEstimator,
which computes the function points and the corresponding KLOC for
a project. Your tool should be able to prepare a comparative analysis
for different programming languages.
40. WORLDTIMER
Develop a software tool, named WorldTimer, which displays the date
and time of cities around the globe in 8 Clocks. It should provide
information, such as language, population, currency and telephone
codes, of the capital cities of all the countries. It should show the
sunrise/sunset line in a world map and the difference in time between
any two cities.
APPENDIX
C
GLOSSARY
Abstract class: A class that cannot be instantiated, i.e., it cannot have
any instances.
Abstract test case: See high-level test case.
Acceptance: See acceptance testing.
Acceptance criteria: The exit criteria that a component or system
must satisfy in order to be accepted by a user, customer, or other
authorized entity. [IEEE 6.10]
Acceptance testing: It is done by the customer to check whether the
product is ready for use in the real-life environment. Formal testing
with respect to user needs, requirements, and business processes
conducted to determine whether or not a system satisfies the
acceptance criteria and to enable the user, customers, or other
authorized entity to determine whether or not to accept the system.
[After IEEE 610]
Accessibility testing: Testing to determine the ease by which users
with disabilities can use a component or system. [Gerrard]
Accuracy: The capability of the software product to provide the right
or agreed results or effects with the needed degree of precision. [ISO
9126] See also functionality testing.
Activity: A major unit of work to be completed in achieving the
objectives of a hardware/ software project.
Actor: An actor is a role played by a person, organization, or any
other device which interacts with the system.
Actual outcome: See actual result.
Actual result: The behavior produced/observed when a component or
system is tested.
Ad hoc review: See informal review.
Ad hoc testing: Testing carried out informally; no formal test
preparation takes place, no recognized test design technique is used,
there are no expectations for results and randomness guides the test
execution activity.
Adaptability: The capability of the software product to be adapted for
different specified environments without applying actions or means
other than those provided for this purpose for the software considered.
[ISO 9126] See also portability testing.
Agile testing: Testing practice for a project using agile
methodologies, such as extreme programming (XP), treating
development as the customer of testing and emphasizing the test-first
design paradigm.
Aggregation: Process of building up of complex objects out of
existing objects.
Algorithm test [TMap]: See branch testing.
Alpha testing: Simulated or actual operational testing by potential
users/customers or an independent test team at the developers’ site, but
outside the development organization. Alpha testing is often employed
as a form of internal acceptance testing.
Analyst: An individual who is trained and experienced in analyzing
existing systems to prepare SRS (software requirement specifications).
Analyzability: The capability of the software product to be diagnosed
for deficiencies or causes of failures in the software, or for the parts to
be modified to be identified. [ISO 9126] See also maintainability
testing.
Analyzer: See static analyzer.
Anomaly: Any condition that deviates from expectation based on
requirements specifications, design documents, user documents,
standards, etc. or from someone’s perception or experience.
Anomalies may be found during, but not limited to, reviewing, testing,
analysis, compilation, or use of software products or applicable
documentation. [IEEE 1044] See also defect, deviation, error, fault,
failure, incident, or problem.
Arc testing: See branch testing.
Atomicity: A property of a transaction that ensures it is completed
entirely or not at all.
Attractiveness: The capability of the software product to be attractive
to the user. [ISO 9126] See also usability testing.
Audit: An independent evaluation of software products or processes
to ascertain compliance to standards, guidelines, specifications, and/or
procedures based on objective criteria, including documents that
specify: (1) the form or content of the products to be produced, (2) the
process by which the products shall be produced, and (3) how
compliance to standards or guidelines shall be measured. [IEEE 1028]
Audit trail: A path by which the original input to a process (e.g., data)
can be traced back through the process, taking the process output as a
starting point. This facilitates defect analysis and allows a process
audit to be carried out. [After TMap]
Automated testware: Testware used in automated testing, such as
tool scripts.
Availability: The degree to which a component or system is
operational and accessible when required for use. Often expressed as a
percentage. [IEEE 610]
Back-to-back testing: Testing in which two or more variants of a
component or system are executed with the same inputs, the outputs
compared, and analyzed in cases of discrepancies. [IEEE 610]
Baseline: A specification or software product that has been formally
reviewed or agreed upon, that thereafter serves as the basis for further
development, and that can be changed only through a formal change
control process. [After IEEE 610] A hardware/software work product
that has been formally reviewed and agreed upon, which serves as the
basis for further development.
Basic block: A sequence of one or more consecutive executable
statements containing no branches.
Basis test set: A set of test cases derived from the internal structure or
specification to ensure that 100% of a specified coverage criterion is
achieved.
Bebugging: See error seeding. [Abbott]
Behavior: The response of a component or system to a set of input
values and preconditions.
Benchmark test: (1) A standard against which measurements or
comparisons can be made. (2) A test that is to be used to compare
components or systems to each other or to a standard as in (1). [After
IEEE 610]
Bespoke software: Software developed specifically for a set of users
or customers. The opposite is off-the-shelf software.
Best practice: A superior method or innovative practice that
contributes to the improved performance of an organization under
given context, usually recognized as “best” by other peer
organizations.
Beta testing: Operational testing by potential and/or existing
users/customers at an external site not otherwise involved with the
developers, to determine whether or not a component or system
satisfies the user/customer needs and fits within the business
processes. Beta testing is often employed as a form of external
acceptance testing in order to acquire feedback from the market.
Big-bang testing: Testing all modules at once. A type of integration
testing in which software elements, hardware elements, or both are
combined all at once into a component or an overall system, rather
than in stages. [After IEEE 610] See also integration testing.
Black-box technique: See black-box test design technique.
Black-box test design technique: Documented procedure to derive
and select test cases based on an analysis of the specification, either
functional or non-functional, of a component or system without
reference to its internal structure.
Black-box testing: Testing, either functional or non-functional,
without reference to the internal structure of the component or system.
Blocked test case: A test case that cannot be executed because the
preconditions for its execution are not fulfilled.
Bohr bug: A repeatable bug; one that manifests reliably under a
possibly unknown but well defined set of conditions.
Bottom-up testing: An incremental approach to integration testing
where the lowest level components are tested first, and then used to
facilitate the testing of higher level components. This process is
repeated until the component at the top of the hierarchy is tested. See
also integration testing.
Boundary value: An input value or output value which is on the edge
of an equivalence partition or at the smallest incremental distance on
either side of an edge, for example, the minimum or maximum value
of a range.
Boundary value analysis: A black-box test design technique in which
test cases are designed based on boundary values.
Boundary value coverage: The percentage of boundary values that
have been exercised by a test suite.
Boundary value testing: See boundary value analysis.
Brainstorming: The process of obtaining ideas, opinions, and
answers to a question in groups. The members of the group are given
the opportunity to contribute.
Branch: A basic block that can be selected for execution based on a
program construct in which one of two or more alternative program
paths are available, e.g., case, jump, go to, ifthen-else.
Branch condition: See condition.
Branch condition combination coverage: See multiple condition
coverage.
Branch condition combination testing: See multiple condition
testing.
Branch condition coverage: See condition coverage.
Branch coverage: The percentage of branches that have been
exercised by a test suite. 100% branch coverage implies both 100%
decision coverage and 100% statement coverage.
Branch testing: A white-box test design technique in which test cases
are designed to execute branches.
Budget: A statement of management plans and expected results
expressed in numbers, quantitative, and monetary terms.
Bug: See defect.
Build: Builds are versions or redesigns of a project that is in
development.
Business process-based testing: An approach to testing in which test
cases are designed based on descriptions and/or knowledge of
business processes.
Capability maturity model (CMM): A five-level staged framework
that describes the key elements of an effective software process. The
capability maturity model covers practices for planning, engineering,
and managing software development and maintenance. [CMM]
Capability maturity model integration (CMMI): A framework that
describes the key elements of an effective product development and
maintenance process. The capability maturity model integration covers
practices for planning, engineering, and managing product
development and maintenance. CMMI is the designated successor of
the CMM. [CMMI]
Capture/playback tool: A type of test execution tool where inputs are
recorded during manual testing in order to generate automated test
scripts that can be executed later (i.e., replayed). These tools are often
used to support automated regression testing.
Capture/replay tool: See capture/playback tool.
CASE: Acronym for Computer Aided Software Engineering.
CAST: Acronym for Computer Aided Software Testing. See also test
automation.
Cause-effect analysis: See cause-effect graphing.
Cause-effect decision table: See decision table.
Cause-effect graph: A graphical representation of inputs and/or
stimuli (causes) with their associated outputs (effects) which can be
used to design test cases.
Cause-effect graphing: A black-box test design technique in which
test cases are designed from cause-effect graphs. [BS 7925/2]
Certification: The process of confirming that a component, system, or
person complies with its specified requirements, e.g., by passing an
exam.
Changeability: The capability of the software product to enable
specified modifications to be implemented. [ISO 9126] See also
maintainability.
Checker: See reviewer.
Chow’s coverage metrics: See N-switch coverage. [Chow]
Class: It provides a blueprint for an object.
Class diagram: A diagram used to show the static view of the system
in terms of classes and their relationships.
Classification tree method: A black-box test design technique in
which test cases, described by means of a classification tree, are
designed to execute combinations of representatives of input and/or
output domains. [Grochtmann]
Code analyzer: See static code analyzer.
Code coverage: An analysis method that determines which parts of
the software have been executed (covered) by the test suite and which
parts have not been executed, e.g., statement coverage, decision
coverage, or condition coverage.
Code-based testing: See white-box testing.
Co-existence: The capability of the software product to co-exist with
other independent software in a common environment sharing
common resources. [ISO 9126] See portability testing.
Collaboration diagram: A diagram that focuses on object
interactions irrespective of time.
Commercial off-the-shelf (COTS) software: Hardware and software
can be purchased and placed in service without additional
development cost for the system or component. See off-the-shelf
software.
Comparator: See test comparator.
Comparison/back-to-back testing: It detects test failures by
comparing the output of two or more programs complemented to the
same specification.
Compatibility testing: See interoperability testing.
Complete testing: See exhaustive testing.
Completion criteria: See exit criteria.
Complexity: The degree to which a component or system has a design
and/or internal structure that is difficult to understand, maintain, and
verify. See also cyclomatic complexity.
Compliance: The capability of the software product to adhere to
standards, conventions, or regulations in laws and similar
prescriptions. [ISO 9126]
Compliance testing: The process of testing to determine the
compliance of a component or system.
Component: A minimal software item that can be tested in isolation.
Component integration testing: Testing performed to expose defects
in the interfaces and interaction between integrated components.
Component specification: A description of a component’s function in
terms of its output values for specified input values under specified
conditions, and required non-functional behavior (e.g., resource-
utilization).
Component testing: The testing of individual software components.
[After IEEE 610]
Compound condition: Two or more single conditions joined by
means of a logical operator (AND, OR, or XOR), e.g., “A>B AND
C>1000.”
Computer Aided Software Engineering (CASE): Are the automated
tools that help a software engineer to automatically perform some
tasks which if done manually, are very tedious and cumbersome.
Concrete test case: See low-level test case.
Concurrency testing: Testing to determine how the occurrence of
two or more activities within the same interval of time, achieved either
by interleaving the activities or by simultaneous execution, is handled
by the component or system. [After IEEE 610]
Condition: A logical expression that can be evaluated as True or
False, e.g., A>B. See also test condition.
Condition combination coverage: See multiple condition coverage.
Condition combination testing: See multiple condition testing.
Condition coverage: The percentage of condition outcomes that have
been exercised by a test suite. 100% condition coverage requires each
single condition in every decision statement to be tested as True and
False.
Condition determination coverage: The percentage of all single
condition outcomes that independently affect a decision outcome that
have been exercised by a test case suite. 100% condition determination
coverage implies 100% decision condition coverage.
Condition determination testing: A white-box test design technique
in which test cases are designed to execute single condition outcomes
that independently affect a decision outcome.
Condition outcome: The evaluation of a condition to True or False.
Condition testing: A white-box test design technique in which test
cases are designed to execute condition outcomes.
Confidence test: See smoke test.
Configuration: The composition of a component or system as defined
by the number, nature, and interconnections of its constituent parts.
Configuration auditing: The function to check on the contents of
libraries of configuration items, e.g., for standards compliance. [IEEE
610]
Configuration control: An element of configuration management,
consisting of the evaluation, coordination, approval or disapproval,
and implementation of changes to configuration items after formal
establishment of their configuration identification. [IEEE 610]
Configuration identification: An element of configuration
management, consisting of selecting the configuration items for a
system and recording their functional and physical characteristics in
technical documentation. [IEEE 610]
Configuration item: An aggregation of hardware, software, or both,
that is designated for configuration management and treated as a
single entity in the configuration management process. [IEEE 610]
Configuration management: A discipline applying technical and
administrative direction and surveillance to: identify and document the
functional and physical characteristics of a configuration item, control
changes to those characteristics, record and report change processing
and implementation status, and verify compliance with specified
requirements. [IEEE 610]
Configuration testing: See portability testing.
Confirmation testing: See retesting.
Conformance testing: See compliance testing.
Consistency: The degree of uniformity, standardization, and freedom
from contradiction among the documents or parts of a component or
system. [IEEE 610]
Control flow: An abstract representation of all possible sequences of
events (paths) in the execution through a component or system.
Control flow graph: See control flow.
Control flow path: See path.
Conversion testing: Testing of software used to convert data from
existing systems for use in replacement systems.
Correctness: The extent to which software is free from faults.
Cost-benefit analysis: The process of deciding whether to do
something by evaluating the costs of doing it and the benefits of doing
it.
COTS: Acronym for Commercial off-the-shelf software.
Coverage: The degree to which a software feature or characteristic is
tested or analyzed. A measure of test completeness. The degree,
expressed as a percentage, to which a specified coverage item has
been exercised by a test suite.
Coverage analysis: Measurement of achieved coverage to a specified
coverage item during test execution referring to predetermined criteria
to determine whether additional testing is required and, if so, which
test cases are needed.
Coverage item: An entity or property used as a basis for test
coverage, e.g., equivalence partitions or code statements.
Coverage tool: A tool that provides objective measures of what
structural elements, e.g., statements and branches have been exercised
by the test suite.
Critical path method (CPM): A method that shows the analysis of
paths in an activity graph among different milestones of the project.
Custom software: Software that is developed to meet the specific
needs of a particular customer. See bespoke software.
Cyclomatic complexity: The number of independent paths through a
program. Cyclomatic complexity is defined as: L – N + 2P, where – L
= the number of edges/links in a graph – N = the number of nodes in a
graph – P = the number of disconnected parts of the graph (e.g., a
calling graph and a subroutine). [After McCabe]
Cyclomatic number: See cyclomatic complexity.
Data definition: An executable statement where a variable is assigned
a value.
Data driven testing: A scripting technique that stores test input and
expected results in a table or spreadsheet, so that a single control script
can execute all of the tests in the table. Data driven testing is often
used to support the application of test execution tools such as
capture/playback tools. [Fewster and Graham] See also keyword
driven testing.
Data flow: An abstract representation of the sequence and possible
changes of the state of data objects, where the state of an object is a
creation, usage, or destruction. [Beizer]
Data flow analysis: A form of static analysis based on the definitions
and usage of variables.
Data flow coverage: The percentage of definition-use pairs that have
been exercised by a test case suite.
Data flow test: A white-box test design technique in which test cases
are designed to execute definitions and use pairs of variables.
Dead code: See unreachable code.
Debugger: See debugging tool.
Debugging: The process of finding, analyzing, and removing the
causes of failures in software.
Debugging tool: A tool used by programmers to reproduce failures,
investigate the state of programs, and find the corresponding defect.
Debuggers enable programmers to execute programs step by step to
halt a program at any program statement and to set and examine
program variables.
Decision: A program point at which the control flow has two or more
alternative routes. A node with two or more links to separate branches.
Decision condition coverage: The percentage of all condition
outcomes and decision outcomes that have been exercised by a test
suite. 100% decision condition coverage implies both 100% condition
coverage and 100% decision coverage.
Decision condition testing: A white-box test design technique in
which test cases are designed to execute condition outcomes and
decision outcomes.
Decision coverage: The percentage of decision outcomes that have
been exercised by a test suite. 100% decision coverage implies both
100% branch coverage and 100% statement coverage.
Decision outcome: The result of a decision (which therefore
determines the branches to be taken).
Decision table: A table showing combinations of inputs and/or stimuli
(causes) with their associated outputs and/or actions (effects) which
can be used to design test cases. It lists various decision variables, the
conditions assumed by each of the decision variables, and the actions
to take in each combination of conditions.
Decision table testing: A black-box test design technique in which
test cases are designed to execute the combinations of inputs and/or
stimuli (causes) shown in a decision table. [Veenendaal]
Decision testing: A white-box test design technique in which test
cases are designed to execute decision outcomes.
Defect: A flaw in a component or system that can cause the
component or system to fail to perform its required function, e.g., an
incorrect statement or data definition. A defect, if encountered during
execution, may cause a failure of the component or system.
Defect bash: It is an adhoc testing, done by people performing
different roles in the same time duration during the integration testing
phase.
Defect density: The number of defects identified in a component or
system divided by the size of the component or system (expressed in
standard measurement terms, e.g., lines-of code, number of classes, or
function points).
Defect detection percentage (DDP): The number of defects found by
a test phase, divided by the number found by that test phase and any
other means afterwards.
Defect management: The process of recognizing, investigating,
taking action, and disposing of defects. It involves recording defects,
classifying them, and identifying the impact. [After IEEE 1044]
Defect management tool: See incident management tool.
Defect masking: An occurrence in which one defect prevents the
detection of another. [After IEEE 610]
Defect report: A document reporting on any flaw in a component or
system that can cause the component or system to fail to perform its
required function. [After IEEE 829]
Defect tracking tool: See incident management tool.
Definition-use pair: The association of the definition of a variable
with the use of that variable. Variable uses include computational
(e.g., multiplication) or to direct the execution of a path (“predicate”
use).
Deliverable: Any (work) product that must be delivered to someone
other than the (work) product’s author.
Delphi technique: Several participants make their individual cost
estimates and then share them.
Design-based testing: An approach to testing in which test cases are
designed based on the architecture and/or detailed design of a
component or system (e.g., tests of interfaces between components or
systems).
Desk checking: Testing of software or specification by manual
simulation of its execution. A manual analysis of a work product to
discover errors.
Development testing: Formal or informal testing conducted during
the implementation of a component or system, usually in the
development environment by developers. [After IEEE 610]
Deviation: See incident.
Deviation report: See incident report.
Dirty testing: See negative testing.
Divide-and-conquer (or Decomposition): The process of dividing
something large into smaller units (called modules) so as to simplify
our tasks. It is appliciable to cost estimation, design, and testing.
Documentation testing: To ensure that the documentation is
consistent with the product. Testing the quality of the documentation,
e.g., user guide or installation guide.
Domain: The set from which valid input and/or output values can be
selected.
Domain testing: The execution of test cases developed by analysis of
input data relationships and constraints. Domain testing exploits the
tester’s domain knowledge to test the suitability of the product to what
the users do on a typical day.
Driver: In bottom-up integration, we start with the leaves of the
decomposition tree and test them with specially coded drivers. Less
throw-away code exists in drivers than there is in stubs. A software
component or test tool that replaces a component that takes care of the
control and/or the calling of a component or system. [After TMap]
Duplex testing: A test bed where the test driver runs on a computer
system separate from the computer system where the system-under-
test (SUT) runs.
Dynamic analysis: The process of evaluating behavior, e.g., memory
performance, CPU usage, of a system, or component during execution.
[After IEEE 610]
Dynamic comparison: Comparison of actual and expected results,
performed while the software is being executed, for example, by a test
execution tool.
Dynamic testing: Testing that involves the execution of the software
of a component or system.
Efficiency: The capability of the software product to provide
appropriate performance, relative to the amount of resources used
under stated conditions. [ISO 9126]
Efficiency testing: The process of testing to determine the efficiency
of a software product.
Elementary comparison testing: A black-box test design technique
in which test cases are designed to execute combinations of inputs
using the concept of condition determination coverage. [TMap]
Embedded software: A software to run in specific hardware devices.
It is embedded in ROM.
Emulator: A device, computer program, or system that accepts the
same inputs and produces the same outputs as a given system. [IEEE
610] See also simulator.
Encapsulation: The wrapping up of data and function into a single
unit.
Entry criteria: The set of generic and specific conditions for
permitting a process to go forward with a defined task, e.g., test phase.
The purpose of entry criteria is to prevent a task from starting which
would entail more (wasted) effort compared to the effort needed to
remove the failed entry criteria. [Gilb and Graham]
Entry point: The first executable statement within a component.
Equivalence class: See equivalence partition.
Equivalence partition: A portion of an input or output domain for
which the behavior of a component or system is assumed to be the
same, based on the specification.
Equivalence partition coverage: The percentage of equivalence
partitions that have been exercised by a test suite.
Equivalence partitioning: A black-box test design technique in
which test cases are designed to execute representatives from
equivalence partitions. In principle, test cases are designed to cover
each partition at least once.
Error: A human action that produces an incorrect result. [After IEEE
610]
Error guessing: A test design technique where the experience of the
tester is used to anticipate what defects might be present in the
component or system-under-test as a result of errors made, and to
design tests specifically to expose them.
Error seeding: It determines whether a set of test cases is adequate by
inserting known error types into the program and executing it with test
cases. The process of intentionally adding known defects to those
already in the component or system for the purpose of monitoring the
rate of detection and removal, and estimating the number of remaining
defects. [IEEE 610]
Error tolerance: The ability of a system or component to continue
normal operation despite the presence of erroneous inputs. [After
IEEE 610]
Evaluation: See testing.
Event: Something that causes a system or object to change state.
Exception handling: Behavior of a component or system in response
to erroneous input, from either a human user or from another
component or system, or to an internal failure.
Executable statement: A statement which, when compiled, is
translated into object code, and which will be executed procedurally
when the program is running and may perform an action on data.
Exercised: A program element is said to be exercised by a test case
when the input value causes the execution of that element, such as a
statement, decision, or other structural element.
Exhaustive testing: A test approach in which the test suite comprises
all combinations of input values and preconditions.
Exit criteria: The set of generic and specific conditions, agreed upon
with the stakeholders, for permitting a process to be officially
completed. The purpose of exit criteria is to prevent a task from being
considered completed when there are still outstanding parts of the task
which have not been finished. Exit criteria are used by testing to report
against and to plan when to stop testing. [After Gilb and Graham]
Exit point: The last executable statement within a component.
Expected outcome: See expected result.
Expected result: The behavior predicted by the specification, or
another source, of the component or system under specified
conditions.
Exploratory testing: Testing where the tester actively controls the
design of the tests as those tests are performed and uses information
gained while testing to design new and better tests. [Bach]
Fail: A test is deemed to fail if its actual result does not match its
expected result.
Failure: Actual deviation of the component or system from its
expected delivery, service, or result. [After Fenton]
Failure mode: The physical or functional manifestation of a failure.
For example, a system in failure mode may be characterized by slow
operation, incorrect outputs, or complete termination of execution.
Failure mode and effect analysis (FMEA): A systematic approach to
risk identification and analysis of identifying possible modes of failure
and attempting to prevent their occurrence.
Failure rate: The ratio of the number of failures of a given category
to a given unit of measure, e.g., failures per unit of time, failures per
number of transactions, failures per number of computer runs. [IEEE
610]
Fault: See defect.
Fault density: See defect density.
Fault detection percentage (FDP): See Defect detection percentage
(DDP).
Fault masking: See defect masking.
Fault spawing: The introduction of new faults when a fault is
removed.
Fault tolerance: The capability of the software product to maintain a
specified level of performance in cases of software faults (defects) or
of infringement of its specified interface. [ISO 9126] See also
reliability.
Fault tree analysis: A method used to analyze the causes of faults
(defects).
Feasible path: A path for which a set of input values and
preconditions exists which causes it to be executed.
Feature: An attribute of a component or system specified or implied
by requirements documentation (for example, reliability, usability, or
design constraints). [After IEEE 1008]
Field testing: See beta testing.
Finite state machine: A computational model consisting of a finite
number of states and transitions between those states, possibly with
accompanying actions. [IEEE 610]
Finite state testing: See state transition testing.
Fork: A symbol in an activity diagram to show splitting of control
into multiple threads.
Formal language: A language that uses mathematics for the purpose
of modelling.
Formal review: A review characterized by documented procedures
and requirements, e.g., inspection. Careful planned meetings,
reviewers are responsible and review reports are also generated and
acted upon.
Formal testing: Testing conducted in accordance with test plans and
procedures that have been reviewed and approved by a customer, user,
or designated level of management.
Frozen test basis: A test basis document that can only be amended by
a formal change control process. See also baseline.
Function point analysis (FPA): Method aiming to measure the size
of the functionality of an information system. The measurement is
independent of the technology. This measurement may be used as a
basis for the measurement of productivity, the estimation of the
needed resources, and project control.
Functional integration: An integration approach that combines the
components or systems for the purpose of getting a basic functionality
working early. See also integration testing.
Functional requirement: A requirement that specifies a function that
a component or system must perform. [IEEE 610]
Functional test design technique: Documented procedure to derive
and select test cases based on an analysis of the specification of the
functionality of a component or system without reference to its
internal structure. See also black-box test design technique.
Functional testing: Testing based on an analysis of the specification
of the functionality of a component or system. See also black-box
testing.
Functionality: The capability of the software product to provide
functions which meet stated and implied needs when the software is
used under specified conditions. [ISO 9126]
Functionality testing: The process of testing to determine the
functionality of a software product.
Gantt chart: A diagram used to graphically represent the start and
end dates of each software engineering task. These charts can be
drawn using MS-Project as a CASE tool.
Generalization: It is a form of abstraction that specifies that 2 or
more entities that share common attributes can be generalized into a
higher level entity type called a super type or generic entity.
Generic software: Softwares that perform functions on general
purpose computers.
Glass-box testing: See white-box testing.
Glue code: Code that is written to connect reused commercial off-the-
shelf applications.
Gold plating: Building a list of requirements that does more than
needed.
Gray-box testing: A combined (or hybrid) approach of white- and
black-box techniques. Gray-box may involve 95% of white-box
testing strategies and 5% of black-box and vice versa is also true.
Guard condition: A condition that determines whether a certain
transition will occur in a state diagram when an event happens.
Heuristic evaluation: A static usability test technique to determine
the compliance of a user interface with recognized usability principles
(the so-called “heuristics”).
High-level test case: A test case without concrete (implementation
level) values for input data and expected results.
Horizontal traceability: The tracing of requirements for a test level
through the layers of test documentation (e.g., test plan, test design
specification, test case specification, and test procedure specification).
Impact analysis: The assessment of change to the layers of
development documentation, test documentation, and components in
order to implement a given change to specified requirements.
Incident: Any event occurring during testing that requires
investigation. [After IEEE 1008]
Incident: It is the symptom associated with a failure that alerts the
user to the occurrence of a failure.
Incident management: The process of recognizing, investigating,
taking action, and disposing of incidents. It involves recording
incidents, classifying them, and identifying the impact. [After IEEE
1044]
Incident management tool: A tool that facilitates the recording and
status tracking of incidents found during testing. They often have
workflow-oriented facilities to track and control the allocation,
correction, and re-testing of incidents and provide reporting facilities.
Incident report: A document reporting on any event that occurs
during the testing which requires investigation. [After IEEE 829]
Incremental development model: A development life cycle where a
project is broken into a series of increments, each of which delivers a
portion of the functionality in the overall project requirements. The
requirements are prioritized and delivered in priority order in the
appropriate increment. In some (but not all) versions of this life cycle
model, each subproject follows a “mini-model” with its own design,
coding, and testing phases.
Incremental testing: Testing where components or systems are
integrated and tested one or some at a time until all of the components
or systems are integrated and tested.
Independence: Separation of responsibilities, which encourages the
accomplishment of objective testing. [After DO-178b]
Infeasible path: A path that cannot be exercised by any set of
possible input values.
Informal review: No planned meetings, reviewers have no
responsibility and they do not produce a review reports. A review not
based on a formal (documented) procedure.
Informal testing: Testing conducted in accordance with test plans and
procedures that have not been reviewed and approved by a customer,
user, or designated level of management.
Input: A variable (whether stored within a component or outside) that
is read by a component.
Input domain: The set from which valid input values can be selected.
See also domain.
Input value: An instance of an input. See also input.
Inspection: A type of review that relies on visual examination of
documents to detect defects, e.g., violations of development standards
and non-conformance to higher level documentation. The most formal
review technique and therefore always based on a documented
procedure. [After IEEE 610, IEEE 1028]
Inspection leader: See moderator.
Inspector: See reviewer.
Installability: The capability of the software product to be installed in
a specified environment. [ISO 9126] See also portability.
Installability testing: The process of testing the installability of a
software product. See also portability testing.
Installation guide: Supplied instructions on any suitable media which
guides the installer through the installation process. This may be a
manual guide, step-by-step procedure, installation wizard, or any other
similar process description.
Installation wizard: Supplied software on any suitable media which
leads the installer through the installation process. It normally runs the
installation process, provides feedback on installation results, and
prompts for options.
Instrumentation: The insertion of additional code into the program in
order to collect information about program behavior during execution.
Instrumenter: A software tool used to carry out instrumentation.
Intake test: A special instance of a smoke test to decide if the
component or system is ready for detailed and further testing. An
intake test is typically carried out at the start of the test execution
phase.
Integration: The process of combining components or systems into
larger assemblies.
Integration testing: Testing performed to expose defects in the
interfaces and in the interactions between integrated components or
systems. See also component integration testing and system
integration testing.
Integration testing in the large: See system integration testing.
Integration testing in the small: See component integration testing.
Interaction diagram: A sequence diagram or collaboration diagram
used to model the dynamic aspects of software.
Interface testing: An integration test type that is concerned with
testing the interfaces between components or systems.
Interoperability: The effort required to couple one system to another.
The capability of the software product to interact with one or more
specified components or systems. [After ISO 9126] See also
functionality.
Interoperability testing: The process of testing to determine the
interoperability of a software product. See also functionality testing.
Invalid testing: Testing using input values that should be rejected by
the component or system. See also error tolerance.
Isolation testing: Testing of individual components in isolation from
surrounding components, with surrounding components being
simulated by stubs and drivers, if needed.
Item transmittal report: See release note.
Key performance indicator: See performance indicator.
Keyword driven testing: A scripting technique that uses data files to
contain not only test data and expected results, but also keywords
related to the application being tested. The keywords are interpreted
by special supporting scripts that are called by the control script for
the test. See also data driven testing.
LCSAJ: A linear code sequence and jump, consisting of the following
three items (conventionally identified by line numbers in a source
code listing): the start of the linear sequence of executable statements,
the end of the linear sequence, and the target line to which control
flow is transferred at the end of the linear sequence.
LCSAJ coverage: The percentage of LCSAJs of a component that
have been exercised by a test suite. 100% LCSAJ coverage implies
100% decision coverage.
LCSAJ testing: A white-box test design technique in which test cases
are designed to execute LCSAJs.
Learnability: The capability of the software product to enable the
user to learn its application. [ISO 9126] See also usability.
Limited entry decision tables: Decision tables in which all
conditions are binary.
Link testing: See component integration testing.
Load test: A test type concerned with measuring the behavior of a
component or system with increasing load, e.g., number of parallel
users and/or numbers of transactions to determine what load can be
handled by the component or system.
Locale: An environment where the language, culture, laws, currency,
and many other factors may be different.
Locale testing: It focuses on testing the conventions for number,
punctuations, date and time, and currency formats.
Logic-coverage testing: See white-box testing. [Myers]
Logic-driven testing: See white-box testing.
Logical test case: See high-level test case.
Low-level test case: A test case with concrete (implementation level)
values for input data and expected results.
Maintainability: The ease with which a software product can be
modified to correct defects, modified to meet new requirements,
modified to make future maintenance easier, or adapted to a changed
environment. [ISO 9126]
Maintainability testing: The process of testing to determine the
maintainability of a software product.
Maintenance: Modification of a software product after delivery to
correct defects, to improve performance or other attributes, or to adapt
the product to a modified environment. [IEEE 1219]
Maintenance testing: Testing the changes to an operational system or
the impact of a changed environment to an operational system.
Management review: A systematic evaluation of software
acquisition, supply, development, operation, or maintenance process,
performed by or on behalf of management that monitors progress,
determines the status of plans and schedules, confirms requirements
and their system allocation, or evaluates the effectiveness of
management approaches to achieve fitness for purpose. [After IEEE
610, IEEE 1028]
Mandel bug: A bug whose underlying causes are so complex and
obscure as to make its behavior appear chaotic or even non-
deterministic.
Master test plan: See project test plan.
Maturity: (1) The capability of an organization with respect to the
effectiveness and efficiency of its processes and work practices. See
also capability maturity model and test maturity model. (2) The
capability of the software product to avoid failure as a result of defects
in the software. [ISO 9126] See also reliability.
Measure: The number or category assigned to an attribute of an entity
by making a measurement. [ISO 14598]
Measurement: The process of assigning a number or category to an
entity to describe an attribute of that entity. [ISO 14598]
Measurement scale: A scale that constrains the type of data analysis
that can be performed on it. [ISO 14598]
Memory leak: A situation in which a program requests memory but
does not release it when it is no longer needed. A defect in a
program’s dynamic store allocation logic that causes it to fail to
reclaim memory after it has finished using it, eventually causing the
program to fail due to lack of memory.
Message: Message is a programming language mechanism by which
one unit transfers control to another unit.
Messages: It shows how objects communicate. Each message
represents one object making function call of another.
Metric: A measurement scale and the method used for measurement.
[ISO 14598]
Migration testing: See conversion testing.
Milestone: A point in time in a project at which defined (intermediate)
deliverables and results should be ready.
Mistake: See error.
Moderator: The leader and main person responsible for an inspection
or other review process.
Modified condition decision coverage: See condition determination
coverage.
Modified condition decision testing: See condition determination
coverage testing.
Modified multiple condition coverage: See condition determination
coverage.
Modified multiple condition testing: See condition determination
coverage testing.
Module: Modules are parts, components, units, or areas that comprise
a given project. They are often thought of as units of software code.
See also component.
Module testing: See component testing.
Monitor: A software tool or hardware device that runs concurrently
with the component or system under test and supervises, records,
and/or analyzes the behavior of the component or system. [After IEEE
610]
Monkey testing: Randomly test the product after all planned test
cases are done.
Multiple condition: See compound condition.
Multiple condition coverage: The percentage of combinations of all
single condition outcomes within one statement that have been
exercised by a test suite. 100% multiple condition coverage implies
100% condition determination coverage.
Multiple condition testing: A white-box test design technique in
which test cases are designed to execute combinations of single
condition outcomes (within one statement).
Multiplicity: Information placed at each end of an association
indicating how many instances of one class can be related to instances
of the other class.
Mutation analysis: A method to determine test suite thoroughness by
measuring the extent to which a test suite can discriminate the
program from slight variants (mutants) of the program.
N-switch coverage: The percentage of sequences of N+1 transitions
that have been exercised by a test suite. [Chow]
N-switch testing: A form of state transition testing in which test cases
are designed to execute all valid sequences of N+1 transitions. [Chow]
See also state transition testing.
Negative functional testing: Testing the software with invalid inputs.
Negative testing: Tests aimed at showing that a component or system
does not work. Negative testing is related to the testers’ attitude rather
than a specific test approach or test design technique. [After Beizer]
Nonconformity: Non fulfillment of a specified requirement. [ISO
9000]
Nonfunctional requirement: A requirement that does not relate to
functionality, but to attributes of such as reliability, efficiency,
usability, maintainability, and portability.
Nonfunctional testing: Testing the attributes of a component or
system that do not relate to functionality, e.g., reliability, efficiency,
usability, maintainability, and portability.
Nonfunctional test design techniques: Methods used to design or
select tests for nonfunctional testing.
Non-reentrant code: It is a piece of program that modifies itself.
Object: It encapsulates information and behavior. It represents a real-
world thing, e.g., ATM screen, card reader, etc.
Off point: A value outside of a domain.
Off-the-shelf software: A software product that is developed for the
general market, i.e., for a large number of customers, and that is
delivered to many customers in identical format.
Operability: The capability of the software product to enable the user
to operate and control it. [ISO 9126] See also usability.
Operational environment: Hardware and software products installed
at users’ or customers’ sites where the component or system-under-test
will be used. The software may include operating systems, database
management systems, and other applications.
Operational profile testing: Statistical testing using a model of
system operations (short duration tasks) and their probability of typical
use. [Musa]
Operational testing: Testing conducted to evaluate a component or
system in its operational environment. [IEEE 610]
Oracle: See test oracle.
Outcome: See result.
Output: A variable (whether stored within a component or outside)
that is written by a component.
Output domain: The set from which valid output values can be
selected. See also domain.
Output value: An instance of an output. See also output.
Pair programming: A software development approach whereby lines
of code (production and/ or test) of a component are written by two
programmers sitting at a single computer. This implicitly means
ongoing real-time code reviews are performed.
Pair testing: Two testers work together to find defects. Typically,
they share one computer and trade control of it while testing.
Pareto Principle: A rule that states that 80% of the benefit can be
obtained with 20% of the work. For example, 80% of CPU time is
spent executing 20% of the statements.
Partition testing: See equivalence partitioning. [Beizer]
Pass: A test is deemed to pass if its actual result matches its expected
result.
Pass/fail criteria: Decision rules used to determine whether a test
item (function) or feature has passed or failed a test. [IEEE 829]
Path: A sequence of events, e.g., executable statements, of a
component or system from an entry point to an exit point.
Path coverage: The percentage of paths that have been exercised by a
test suite. 100% path coverage implies 100% LCSAJ coverage.
Path sensitizing: Choosing a set of input values to force the execution
of a given path.
Path testing: A white-box test design technique in which test cases
are designed to execute paths.
Peer review: See technical review.
Performance: The degree to which a system or component
accomplishes its designated functions within given constraints
regarding processing time and throughput rate. [After IEEE 610] See
efficiency.
Performance indicator: A high level metric of effectiveness and/or
efficiency used to guide and control progressive development, e.g.,
defect detection percentage (DDP) for testing. [CMMI]
Performance testing: The process of testing to determine the
performance of a software product. See efficiency testing.
Performance testing tool: A tool to support performance testing and
that usually has two main facilities: load generation and test
transaction measurement. Load generation can simulate either multiple
users or high volumes of input data. During execution, response time
measurements are taken from selected transactions and these are
logged. Performance testing tools normally provide reports based on
test logs and graphs of load against response times.
Person-month: One person-month is the amount of work done by one
person in one month if they are working full time.
Phase test plan: A test plan that typically addresses one test level.
Polymorphism (poly = many, morphs = forms): Many forms of a
same function is polymorphism. The compiler resolves such issues
based on either the total number of parameters or their data types.
Portability: The ease with which the software product can be
transferred from one hardware or software environment to another.
[ISO 9126]
Portability testing: The process of testing to determine the portability
of a software product.
Positive functional testing: Testing the software with valid inputs.
Post-execution comparison: Comparison of actual and expected
results, performed after the software has finished running.
Postcondition: Environmental and state conditions that must be
fulfilled after the execution of a test or test procedure.
Precondition: Environmental and state conditions that must be
fulfilled before the component or system can be executed with a
particular test or test procedure.
Predicted outcome: See expected result.
Pretest: See intake test.
Priority: The level of (business) importance assigned to an item, e.g.,
defect.
Problem: See defect.
Problem management: See defect management.
Problem report: See defect report.
Process: A set of interrelated activities which transform inputs into
outputs. [ISO 12207]
Process cycle test: A black-box test design technique in which test
cases are designed to execute business procedures and processes.
[TMap]
Production environment: It refers to the environment in which the
final software will run.
Program instrumenter: See instrumenter.
Program testing: See component testing.
Project: A project is a unique set of coordinated and controlled
activities with start and finish dates undertaken an objective
conforming to specific requirements, including the constraints of time,
cost, and resources. [ISO 9000]
Project Evaluation Review Technique (PERT): It shows different
project task activities and their relationship with each other.
Project test plan: A test plan that typically addresses multiple test
levels.
Proof of correctness: A formal technique to prove mathematically
that a program satisfies its specifications.
Prototyping: It helps to examine the probable results of implementing
software requirements.
Pseudo-random: A series which appears to be random but is in fact
generated according to some prearranged sequence.
Quality: The degree to which a component, system, or process meets
specified requirements and/or user/customer needs and expectations.
[After IEEE 610]
Quality assurance: Part of quality management focused on providing
confidence that quality requirements will be fulfilled. [ISO 9000]
Quality attribute: A feature or characteristic that affects an item’s
quality. [IEEE 610]
Quality characteristic: See quality attribute.
Quality management: Coordinated activities to direct and control an
organization with regard to quality. Direction and control with regard
to quality generally includes the establishment of the quality policy
and quality objectives, quality planning, quality control, quality
assurance, and quality improvement. [ISO 9000]
Random testing: A black-box test design technique where test cases
are selected, possibly using a pseudo-random generation algorithm, to
match an operational profile. This technique can be used for testing
nonfunctional attributes such as reliability and performance.
Rapid (or throwaway prototyping): This approach is to construct a
“quick and dirty” partial solution to the system prior to requirements
stage.
Real-time software: Software in which we have strict time
constraints.
Recorder: See scribe.
Record/playback tool: See capture/playback tool.
Recoverability: The capability of the software product to re-establish
a specified level of performance and recover the data directly affected
in case of failure. [ISO 9126] See also reliability.
Recoverability testing: The process of testing to determine the
recoverability of a software product. See also reliability testing.
Recovery testing: See recoverability testing.
Reentrant code: It is a piece of program that does not modify itself.
Regression testing: The process of retesting a system after changes
have been made to it. Testing of a previously tested program following
modification to ensure that defects have not been introduced or
uncovered in unchanged areas of the software, as a result of the
changes made. It is performed when the software or its environment is
changed.
Release (or golden master): The build that will eventually be shipped
to the customer, posted on the Web, or migrated to the live Web site.
Release note: A document identifying test items, their configuration,
current status, and other delivery information delivered by
development to testing, and possibly other stakeholders, at the start of
a test execution phase. [After IEEE 829]
Reliability: Probability of failure free operation of software for a
specified time under specified operating conditions. The ability of the
software product to perform its required functions under stated
conditions for a specified period of time, or for a specified number of
operations. [ISO 9126]
Reliability testing: The process of testing to determine the reliability
of a software product.
Replaceability: The capability of the software product to be used in
place of another specified software product for the same purpose in the
same environment. [ISO 9126] See also portability.
Requirement: A condition or capability needed by a user to solve a
problem or achieve an objective that must be met or possessed by a
system or system component to satisfy a contract, standard,
specification, or other formally imposed document. [After IEEE 610]
Requirements-based testing: An approach to testing in which test
cases are designed based on test objectives and test conditions derived
from requirements, e.g., tests that exercise specific functions or probe
non functional attributes such as reliability or usability.
Requirements management tool: A tool that supports the recording
of requirements, requirements attributes (e.g., priority, knowledge
responsible) and annotation, and facilitates traceability through layers
of requirements and requirements change management. Some
requirements management tools also provide facilities for static
analysis, such as consistency checking and violations to pre-defined
requirements rules.
Requirements phase: The period of time in the software life cycle
during which the requirements for a software product are defined and
documented. [IEEE 610]
Requirements tracing: It is a technique of ensuring that the product,
as well as the testing of the product, addresses each of its
requirements.
Resource utilization: The capability of the software product to use
appropriate amounts and types of resources, for example, the amounts
of main and secondary memory used by the program and the sizes of
required temporary or overflow files, when the software performs its
function under stated conditions. [After ISO 9126] See also efficiency.
Resource utilization testing: The process of testing to determine the
resource utilization of a software product.
Result: The consequence/outcome of the execution of a test. It
includes outputs to screens, changes to data, reports, and
communication messages sent out. See also actual result and expected
result.
Resumption criteria: The testing activities that must be repeated
when testing is restarted after a suspension. [After IEEE 829]
Retesting: Testing that runs test cases that failed the last time they
were run, in order to verify the success of corrective actions.
Review: An evaluation of a product or project status to ascertain
discrepancies from planned results and to recommend improvements.
Examples include management review, informal review, technical
review, inspection, and walkthrough. [After IEEE 1028]
Reviewer: The person involved in the review who shall identify and
describe anomalies in the product or project under review. Reviewers
can be chosen to represent different viewpoints and roles in the review
process.
Risk: A factor that could result in future negative consequences;
usually expressed as impact and likelihood. The possibility of loss or
injury; a problem that might occur.
Risk analysis: The process of assessing identified risks to estimate
their impact and probability of occurrence (likelihood).
Risk-based testing: Testing oriented towards exploring and providing
information about product risks. [After Gerrard]
Risk control: The process through which decisions are reached and
protective measures are implemented for reducing risks to, or
maintaining risks within, specified levels.
Risk identification: The process of identifying risks using techniques
such as brainstorming, checklists, and failure history.
Risk management: Systematic application of procedures and
practices to the tasks of identifying, analyzing, prioritizing, and
controlling risk.
Risk mitigation: See risk control.
Robustness: The degree to which a component or system can function
correctly in the presence of invalid inputs or stressful environmental
conditions. [IEEE 610] See also error tolerance and fault-tolerance.
Root cause: An underlying factor that caused a nonconformance and
possibly should be permanently eliminated through process
improvement.
Root cause analysis: The process of determining the ultimate reason
why a software engineer made the error that introduced a defect.
Safety: The capability of the software product to achieve acceptable
levels of risk of harm to people, business, software, property, or the
environment in a specified context of use. [ISO 9126]
Safety testing: The process of testing to determine the safety of a
software product.
Sanity test: See smoke test.
Scalability: The capability of the software product to be upgraded to
accommodate increased loads. [After Gerrard]
Scalability testing: Testing to determine the scalability of the
software product.
Scenario testing: See use-case testing.
Scribe: The person who has to record each defect mentioned and any
suggestions for improvement during a review meeting on a logging
form. The scribe has to make sure that the logging form is readable
and understandable.
Scripting language: A programming language in which executable
test scripts are written, used by a test execution tool (e.g., a
capture/replay tool).
Security: Attributes of software products that bear on its ability to
prevent unauthorized access, whether accidental or deliberate, to
programs and data. [ISO 9126]
Security testing: Testing to determine the security of the software
product.
Serviceability testing: See maintainability testing.
Severity: The degree of impact that a defect has on the development
or operation of a component or system. [After IEEE 610]
Shelfware: Software that is not used.
Simulation: A technique that uses an executable model to examine
the behavior of the software. The representation of selected behavioral
characteristics of one physical or abstract system by another system.
[ISO 2382/1]
Simulator: A device, computer program, or system used during
testing, which behaves or operates like a given system when provided
with a set of controlled inputs. [After IEEE 610, DO178b] See also
emulator.
Sink node: It is a statement fragment at which program execution
terminates.
Slicing: It is a program decomposition technique used to trace an
output variable back through the code to identify all code statements
relevant to a computation in the program.
Smoke test: It is a condensed version of a regression test suite. A
subset of all defined/planned test cases that cover the main
functionality of a component or system, to ascertaining that the most
crucial functions of a program work, but not bothering with finer
details. A daily build and smoke test are among industry best
practices. See also intake test.
Software feature: See feature.
Software quality: The totality of functionality and features of a
software product that bear on its ability to satisfy stated or implied
needs. [After ISO 9126]
Software quality characteristic: See quality attribute.
Software runaways: Large size projects failed due to lack of usage of
systematic techniques and tools.
Software test incident: See incident.
Software test incident report: See incident report.
Software Usability Measurement Inventory (SUMI): A
questionnaire based usability test technique to evaluate the usability,
e.g., user-satisfaction, of a component or system. [Veenendaal]
Source node: A source node in a program is a statement fragment at
which program execution begins or resumes.
Source statement: See statement.
Specialization: The process of taking subsets of a higher-level entity
set to form lower-level entity sets.
Specification: A document that specifies, ideally in a complete,
precise, and verifiable manner, the requirements, design, behavior, or
other characteristics of a component or system, and, often, the
procedures for determining whether these provisions have been
satisfied. [After IEEE 610]
Specification-based test design technique: See black-box test design
technique.
Specification-based testing: See black-box testing.
Specified input: An input for which the specification predicts a result.
Stability: The capability of the software product to avoid unexpected
effects from modifications in the software. [ISO 9126] See also
maintainability.
Standard software: See off-the-shelf software.
Standards testing: See compliance testing.
State diagram: A diagram that depicts the states that a component or
system can assume, and shows the events or circumstances that cause
and/or result from a change from one state to another. [IEEE 610]
State table: A grid showing the resulting transitions for each state
combined with each possible event, showing both valid and invalid
transitions.
State transition: A transition between two states of a component or
system.
State transition testing: A black-box test design technique in which
test cases are designed to execute valid and invalid state transitions.
See also N-switch testing.
Statement: An entity in a programming language, which is typically
the smallest indivisible unit of execution.
Statement coverage: The percentage of executable statements that
have been exercised by a test suite.
Statement testing: A white-box test design technique in which test
cases are designed to execute statements.
Static analysis: Analysis of software artifacts, e.g., requirements or
code, carried out without execution of these software artifacts.
Static analyzer: A tool that carries out static analysis.
Static code analysis: Analysis of program source code carried out
without execution of that software.
Static code analyzer: A tool that carries out static code analysis. The
tool checks source code, for certain properties such as conformance to
coding standards, quality metrics, or data flow anomalies.
Static testing: Testing of a component or system at specification or
implementation level without execution of that software, e.g., reviews
or static code analysis.
Statistical testing: A test design technique in which a model of the
statistical distribution of the input is used to construct representative
test cases. See also operational profile testing.
Status accounting: An element of configuration management,
consisting of the recording and reporting of information needed to
manage a configuration effectively. This information includes a listing
of the approved configuration identification, the status of proposed
changes to the configuration, and the implementation status of the
approved changes. [IEEE 610]
Storage: See resource utilization.
Storage testing: See resource utilization testing.
Stress testing: Testing conducted to evaluate a system or component
at or beyond the limits of its specified requirements. [IEEE 610]
Structural coverage: Coverage measures based on the internal
structure of the component.
Structural test design technique: See white-box test design
technique.
Structural testing: See white-box testing.
Structured walkthrough: See walkthrough.
Stub: A skeletal or special-purpose implementation of a software
component, used to develop or test a component that calls or is
otherwise dependent on it. It replaces a called component. [After IEEE
610]
Stubs: These are the dummy modules or pieces of throw-away code
that emulate a called unit. Top-down integration begins with the main
program (root of the tree). Any lower-level unit that is called by the
main program appears as a stub.
Subpath: A sequence of executable statements within a component.
Suitability: The capability of the software product to provide an
appropriate set of functions for specified tasks and user objectives.
[ISO 9126] See also functionality.
Suspension criteria: The criteria used to (temporarily) stop all or a
portion of the testing activities on the test items. [After IEEE 829]
Syntax testing: A black-box test design technique in which test cases
are designed based upon the definition of the input domain and/or
output domain.
System: A collection of components organized to accomplish a
specific function or set of functions. [IEEE 610]
System integration testing: Testing the integration of systems and
packages; testing interfaces to external organizations (e.g., electronic
data interchange, Internet).
System testing: The process of testing an integrated system to verify
that it meets specified requirements. [Hetzel]
Technical review: A peer group discussion activity that focuses on
achieving consensus on the technical approach to be taken. A technical
review is also known as a peer review. [Gilb and Graham, IEEE 1028]
Technology transfer: The awareness, convincing, selling, motivating,
collaboration, and special effort required to encourage industry,
organizations, and projects to make good use of new technology
products.
Test: A test is the act of exercising software with test cases. A set of
one or more test cases. [IEEE 829]
Test approach: The implementation of the test strategy for a specific
project. It typically includes the decisions made that follow based on
the (test) project’s goal and the risk assessment carried out, starting
points regarding the test process, the test design techniques to be
applied, exit criteria, and test types to be performed.
Test automation: The use of software to perform or support test
activities, e.g., test management, test design, test execution, and results
checking.
Test basis: All documents from which the requirements of a
component or system can be inferred. The documentation on which
the test cases are based. If a document can be amended only by way of
formal amendment procedure, then the test basis is called a frozen test
basis. [After TMap]
Test bed: An environment containing the hardware, instrumentation,
simulators, software tools, and other support elements needed to
conduct a test. See also test environment.
Test case: A test that, ideally, executes a single well-defined test
objective, i.e., a specific behavior of a feature under a specific
condition. A set of input values, execution preconditions, expected
results and execution postconditions, developed for a particular
objective or test condition, such as to exercise a particular program
path or to verify compliance with a specific requirement. [After IEEE
610]
Test case design technique: See test design technique.
Test case specification: A document specifying a set of test cases
(objective, inputs, test actions, expected results, and execution
preconditions) for a test item. [After IEEE 829]
Test case suite: See test suite.
Test charter: A statement of test objectives, and possibly test ideas.
Test charters are amongst others used in exploratory testing. See also
exploratory testing.
Test comparator: A test tool to perform automated test comparison.
Test comparison: The process of identifying differences between the
actual results produced by the component or system under test and the
expected results for a test. Test comparison can be performed during
test execution (dynamic comparison) or after test execution.
Test completion criterion: See exit criteria.
Test condition: An item or event of a component or system that could
be verified by one or more test cases, e.g., a function, transaction,
quality attribute, or structural element.
Test coverage: See coverage.
Test data: Data that exists (for example, in a database) before a test is
executed, and that affects or is affected by the component or system
under test.
Test data preparation tool: A type of test tool that enables data to be
selected from existing databases or created, generated, manipulated,
and edited for use in testing.
Test deliverables: List of test materials developed by the test group
during the test cycles that are to be delivered before the completion of
the project.
Test design: See test design specification.
Test design specification: A document specifying the test conditions
(coverage items) for a test item, the detailed test approach, and
identifying the associated high-level test cases. [After IEEE 829]
Test design technique: A method used to derive or select test cases.
Test design tool: A tool that supports the test design activity by
generating test inputs from a specification that may be held in a CASE
tool repository, e.g., requirements management tool, or from specified
test conditions held in the tool itself.
Test driver: It automates the execution of a test case. See also driver.
Test environment: An environment containing hardware,
instrumentation, simulators, software tools, and other support elements
needed to conduct a test. [After IEEE 610]
Test evaluation report: A document produced at the end of the test
process summarizing all testing activities and results. It also contains
an evaluation of the test process and lessons learned.
Test execution: The process of running a test by the component or
system under test, producing actual result(s).
Test execution automation: The use of software, e.g.,
capture/playback tools, to control the execution of tests, the
comparison of actual results to expected results, the setting up of test
preconditions, and other test control and reporting functions.
Test execution phase: The period of time in a software development
life cycle during which the components of a software product are
executed, and the software product is evaluated to determine whether
or not requirements have been satisfied. [IEEE 610]
Test execution schedule: A scheme for the execution of test
procedures. The test procedures are included in the test execution
schedule in their context and in the order in which they are to be
executed.
Test execution technique: The method used to perform the actual test
execution, either manually or automated.
Test execution tool: A type of test tool that is able to execute other
software using an automated test script, e.g., capture/playback.
[Fewster and Graham]
Test fail: See fail.
Test generator: See test data preparation tool.
Test harness: A tool that performs automated testing of the core
components of a program or system. It is the driver of test drivers.
Tests under a central control. A test environment comprised of stubs
and drivers needed to conduct a test.
Test incident: See incident.
Test incident report: See incident report.
Test infrastructure: The organizational artifacts needed to perform
testing, consisting of test environments, test tools, office environment,
and procedures.
Test item: The individual element to be tested. There usually is one
test object and many test items. See also test object.
Test item transmittal report: See release note.
Test level: A group of test activities that are organized and managed
together. A test level is linked to the responsibilities in a project.
Examples of test levels are component test, integration test, system
test, and acceptance test. [After TMap]
Test log: A chronological record of relevant details about the
execution of tests. [IEEE 829]
Test logging: The process of recording information about tests
executed into a test log.
Test management: The planning, estimating, monitoring, and control
of test activities, typically carried out by a test manager.
Test manager: The person responsible for testing and evaluating a
test object. The individual, who directs, controls, administers plans,
and regulates the evaluation of a test object.
Test maturity model (TMM): A five level staged framework for test
process improvement, related to the capability maturity model (CMM)
that describes the key elements of an effective test process.
Test object: The component or system to be tested. See also test item.
Test objective: A reason or purpose for designing and executing a
test.
Test oracle: It is a mechanism, different from the program itself that
can be used to check the correctness of the output of the program for
the test cases. It is a process in which test cases are given to test
oracles and the program under testing. The output of the two is then
compared to determine if the program behaved correctly for the test
cases. A source to determine expected results to compare with the
actual result of the software under test. An oracle may be the existing
system (for a benchmark), a user manual, or an individual’s
specialized knowledge, but should not be the code. [After Adrion]
Test outcome: See result.
Test pass: See pass.
Test performance indicator: A metric, in general high level,
indicating to what extent a certain target value or criterion is met.
Often related to test process improvement objectives, e.g., defect
detection percentage (DDP).
Test phase: A distinct set of test activities collected into a manageable
phase of a project, e.g., the execution activities of a test level. [After
Gerrard]
Test plan: A management document outlining risks, priorities, and
schedules for testing. A document describing the scope, approach,
resources, and schedule of intended test activities. It identifies
amongst others test items, the features to be tested, the testing tasks,
who will do each task, degree of tester independence, the test
environment, the test design techniques and test measurement
techniques to be used, and the rationale for their choice, and any risks
requiring contingency planning. It is a record of the test planning
process. [After IEEE 829]
Test planning: The activity of establishing or updating a test plan.
Test point analysis (TPA): A formula-based test estimation method
based on function point analysis. [TMap]
Test points: They allow data to be modified or inspected at various
points in the system.
Test policy: A high-level document describing the principles,
approach, and major objectives of the organization regarding testing.
Test procedure: See test procedure specification.
Test procedure specification: A document specifying a sequence of
actions for the execution of a test. Also known as test script or manual
test script. [After IEEE 829]
Test process: The fundamental test process comprises planning,
specification, execution, recording, and checking for completion. [BS
7925/2]
Test process improvement (TPI): A continuous framework for test
process improvement that describes the key elements of an effective
test process, especially targeted at system testing and acceptance
testing.
Test record: See test log.
Test recording: See test logging.
Test repeatability: An attribute of a test indicating whether the same
results are produced each time the test is executed.
Test report: See test summary report.
Test requirement: A document that describes items and features that
are tested under a required condition.
Test result: See result.
Test run: Execution of a test on a specific version of the test object.
Test run log: See test log.
Test script: Step-by-step instructions that describe how a test case is
to be executed. A test script may contain one or more test cases.
Commonly used to refer to a test procedure specification, especially an
automated one.
Test session: One set of tests for a specific configuration actual code
and stubs.
Test situation: See test condition.
Test specification: A set of test cases, input, and conditions that are
used in the testing of a particular feature or set of features. A test
specification often includes descriptions of expected results. A
document that consists of a test design specification, test case
specification, and/or test procedure specification.
Test stage: See test level.
Test strategy: A high-level document defining the test levels to be
performed and the testing within those levels for a program (one or
more projects).
Test stub: Dummy function/component to simulate a real component.
Test suite: A collection of test scripts or test cases that is used for
validating bug fixes or finding new bugs within a logical or physical
area of a product. For example, an acceptance test suite contains all of
the test cases that are used to verify that the software has met certain
predefined acceptance criteria. On the other hand, a regression suite
contains all of the test cases that are used to verify that all previously
fixed bugs are still fixed. A set of several test cases for a component or
system under test, where the post condition of one test is often used as
the precondition for the next one.
Test summary report: A document summarizing testing activities
and results. It also contains an evaluation of the corresponding test
items against exit criteria. [After IEEE 829]
Test target: A set of exit criteria.
Test tool: A software product that supports one or more test activities,
such as planning and control, specification, building initial files and
data, test execution, and test analysis. [TMap] See also CAST.
Test type: A group of test activities aimed at testing a component or
system regarding one or more interrelated quality attributes. A test
type is focused on a specific test objective, i.e., reliability test,
usability test, regression test, etc., and may take place on one or more
test levels or test phases. [After TMap]
Testable requirements: The degree to which a requirement is stated
in terms that permit establishment of test designs (and subsequently
test cases) and execution of tests to determine whether the
requirements have been met. [After IEEE 610]
Testability: The capability of the software product to enable modified
software to be tested. [ISO 9126] See also maintainability.
Testability looks: The code that is inserted into the program
specifically to facilitate testing.
Testability review: A detailed check of the test basis to determine
whether the test basis is at an adequate quality level to act as an input
document for the test process. [After TMap]
Tester: A technically skilled professional who is involved in the
testing of a component or system.
Testing: The process of executing the program with the intent of
finding faults. The process consisting of all life cycle activities, both
static and dynamic, concerned with planning, preparation, and
evaluation of software products and related work products to
determine that they satisfy specified requirements, to demonstrate that
they are fit for purpose, and to detect defects.
Testing interface: A set of public properties and methods that you can
use to control a component from an external testing program.
Testware: Artifacts produced during the test process required to plan,
design, and execute tests, such as documentation, scripts, inputs,
expected results, set-up and clear-up procedures, files, databases,
environment, and any additional software or utilities used in testing.
[After Fewster and Graham]
Thread testing: A version of component integration testing where the
progressive integration of components follows the implementation of
subsets of the requirements, as opposed to the integration of
components by levels of a hierarchy.
Time behavior: See performance.
Top-down testing: An incremental approach to integration testing
where the component at the top of the component hierarchy is tested
first, with lower level components being simulated by stubs. Tested
components are then used to test lower level components. The process
is repeated until the lowest level components have been tested.
Traceability: The ability to identify related items in documentation
and software, such as requirements with associated tests. See also
horizontal traceability and vertical traceability.
Transaction: A unit of work seen from a system user’s point of view.
UML (unified modified language): A standard language used for
developing software blueprints using nine different diagrams.
Understandability: The capability of the software product to enable
the user to understand whether the software is suitable, and how it can
be used for particular tasks and conditions of use. [ISO 9126] See also
usability.
Unit testing: See component testing.
Unreachable code: Code that cannot be reached and, therefore, is
impossible to execute.
Usability: The capability of the software to be understood, learned,
used, and attractive to the user when used under specified conditions.
[ISO 9126]
Usability testing: The testing that validates the ease of use, speed, and
aesthetics of the product from the user’s point of view. Testing to
determine the extent to which the software product is understood, easy
to learn, easy to operate, and attractive to the users under specified
conditions. [After ISO 9126]
Use-case testing: A black-box test design technique in which test
cases are designed to execute user scenarios.
User acceptance testing: See acceptance testing.
User scenario testing: See use-case testing.
User test: A test whereby real-life users are involved to evaluate the
usability of a component or system.
V-model: A framework to describe the software development life
cycle activities from requirements specification to maintenance. The
V-model illustrates how testing activities can be integrated into each
phase of the software development life cycle.
Validation: It is the process of evaluating a system or component
during or at the end of the development process to determine whether
it satisfies the specified requirements. It involves executing the actual
software. It is “computer based testing” process. Confirmation by
examination and through provision of objective evidence that the
requirements for a specific intended use or application have been
fulfilled. [ISO 9000]
Variable: An element of storage in a computer that is accessible by a
software program by referring to it by a name.
Verification: It is the process of evaluating a system or component to
determine whether the products of a given development phase satisfy
the conditions imposed at the start of that phase. It is a “human
testing” activity. Confirmation by examination and through the
provision of objective evidence that specified requirements have been
fulfilled. [ISO 9000]
Vertical traceability: The tracing of requirements through the layers
of development documentation to components.
Volume testing: Testing where the system is subjected to large
volumes of data. See also resource-utilization testing.
Walkthrough: A step-by-step presentation by the author of a
document in order to gather information and to establish a common
understanding of its content. [Freedman and Weinberg, IEEE 1028]
White-box test design technique: Documented procedure to derive
and select test cases based on an analysis of the internal structure of a
component or system.
White-box testing: Testing based on an analysis of the internal
structure of the component or system.
Wide band delphi: An expert-based test estimation technique that
aims at making an accurate estimation using the collective wisdom of
the team members.
Widget: A synonym for user interface component and control.
Wizard: A user assistance device that guides users step by step
through a procedure.
Work breakdown structure: A structure diagram that shows the
project in terms of phases.
APPENDIX
D
Keywords
Generic Technology Keywords: databases, network and middleware,
programming.
Specific Technology Keywords: MS-SQL server, HTML, Active
Server Pages.
Project Type Keywords: analysis, design, implementation, testing, user
interface.
Alternatives
Number Description (if available)
1. PC with 2 GB hard-disk and 256 Not-Applicable
MB RAM
2.
Software requirements:
Alternatives
Number Description (if available)
1. Windows 95/98/XP with MS- Not-Applicable
Office
2. MS-SQL server MS-Access
3.
Manpower requirements:
2-3 students can complete this in 4-6 months if they work full-time on
it.
BIBLIOGRAPHY
Special thanks to the great researchers without whose help this book
would not have been possible:
1. Jorgensen Paul, “Software Testing—A Practical Approach”, CRC
Press, 2nd Edition 2007.
2. Srinivasan Desikan and Gopalaswamy Ramesh, “Software testing
—Principles and Practices”, Pearson Education Asia, 2002.
3. Tamres Louise, “Introduction to Software Testing”, Pearson
Education Asia, 2002.
4. Mustafa K., Khan R.A., “Software Testing—Concepts and
Practices”, Narosa Publishing, 2007.
5. Puranik Rajnikant, “The Art of Creative Destination”, Shroff
Publishers, First Reprint, 2005.
6. Agarwal K.K., Singh Yogesh, “Software Engineering”, New Age
Publishers, 2nd Edition, 2007.
7. Khurana Rohit, “Software Engineering—Principles and Practices”,
Vikas Publishing House, 1998.
8. Agarwal Vineet, Gupta Prabhakar, “Software Engineering”, Pragati
Prakashan, Meerut.
9. Sabharwal Sangeeta, “Software Engineering—Principles, Tools
and Techniques”, New Age Publishers, 1st Edition, 2002.
10. Mathew Sajan, “Software Engineering”, S. Chand and Company
Ltd., 2000.
11. Kaner, “Lessons Learned in Software Testing”, Wiley, 1999.
12. Rajani Renu, Oak Pradeep, “Software Testing”, Tata McGraw Hill,
First Edition, 2004.
13. Nguyen Hung Q., “Testing Applications on Web”, John Wiley,
2001.
14. “Testing Object-Oriented Systems—A Workshop Workbook”, by
Quality Assurance Institute (India) Ltd., 1994-95.
15. Pressman Roger, “A Manager’s Guide to Software Engineering”,
Tata McGraw Hill, 2004.
16. Perry William E., “Effective Methods for Software Testing”, Wiley
Second Edition, 1995.
17. Cardoso Antonio, “The Test Estimation Process”, June 2000,
Stickyminds.com.
18. Erik P.W.M., Veenendall Van, Dekkers Ton, “Test Point Analysis;
A method for Test Estimation”.
19. Mathur P. Aditya, “Foundations of Software Testing”, Pearson
Education Asia, First Impression, 2008.
20. Black Rex, “Test Estimation”, 2002, Stque Magazine.com.
21. Nangia Rajan, “Software Testing”, Cyber Tech. Publications, First
Edition, 2008.
22. Stout A. Glenn, “Testing a Website: Best Practices”,
“http://www.stickyminds.com/sitewide.asp/XUS893545file/.pdf
23. Kota Krishen, “Testing Your Web Application—A Quick 10–Step
Guide”, Stickyminds.com.
24. Intosh Mac, Strigel W., “The Living Creature”—Testing Web
Applications, 2000,
http://www.stickyminds.com/docs_index/XUS11472file/.pdf.
25. Binder Robert V., “Testing Object Oriented Systems—Models,
Patterns and Tools”, Addison Wesley, 1999.
26. Websites: www.stickyminds.com, www.testingcenter.com.
INDEX
A
Acceptance testing 268, 371
for critical applications 272
types of 271
Advantages of white box testing 191
Automated testing 409
disadvantages of 415
benefits of 414
Available testing tools, techniques and metrics 20
B
Basic concepts of state machines 310
Basic terminology related to software testing 11
Basic test plan template 583–589
Basic unit for testing, inheritance and testing 302
Basis path testing 149
Benefits of automated testing 414
Beta testing 255
Big bang integration 240
Black box testing 489, 560
Black box (or functional) testing techniques 65
Bottom-up integration approach 239
Boundary value analysis (BVA) 66
guidelines for 74
limitations of 67
robustness testing 67
worst-case testing 68
Business vertical testing (BVT) 252
BVA. See Boundary value analysis
C
Call graph based integration 241
Categorizing V&V techniques 33
Cause-effect graphing technique 97
causes and effects 97
guidelines for 101
Certification, standards and testing for compliance 257
Characteristics of modern testing tools 425
Chasing false defects 569
Classification of integration testing 238
Code complexity testing 141
Code coverage testing 136
Coming up with entry/exit criteria 258
Comparison of
black box and white box testing in tabular form 188
conventional and object oriented testing 390
various regression testing techniques 223
white box, black box and gray box testing approaches 209
Comparison on
black box (or functional) testing techniques 102
various white box testing techniques 190
Concept of balance 107
Condition coverage 139
Configuration testing 486
Consideration during automated testing 410
Corrective regression testing 221
Coupling between objects (CBO) 145
Criteria for selection of test tools 422
Cyclomatic complexity
properties and meaning 141, 147
Cyclomatic density (CD) 143
D
Data flow testing 171
DD path testing 165
Debugging 418
Decision table based testing 86
guidelines for 96
Decision tables 87
advantages, disadvantages and applications of 87
Decomposition-based integration 238
Deployment acceptance test 272
Deployment testing 253
Design for testability (DFT) 387
Design/architecture verification 251
Differences between QA and QC 31
Differences between regression and normal testing 220
Differences between verification and validation 30
Disadvantages of automated testing 415
Dynamic white box testing techniques 135
E
Equivalence class test cases for next date function 79
Equivalence class test cases for the commission problem 84
Equivalence class test cases for the triangle problem 78
Equivalence class testing 74
guidelines for 85
strong normal 76
strong robust 77
weak normal 75
weak robust 76
Essential density metric (EDM) 142
Evolving nature of area 31
Executing test cases 270
F
Factors governing performance testing 274
Formal verification 37
Function coverage 140
Functional acceptance simple test (FAST) 271
Functional system testing techniques 250
Functional testing (or black box testing) 489
guidelines for 105
techniques 65
Functional versus non-functional system testing 248
G
Game testing process 559
Good bug writing 573
Graph matrices technique 169
Gray box testing 207
various other definitions of 208
Gui testing 390
Guidelines for
BVA 74
cause-effect functional testing technique 101
choose integration method and
conclusions 241
decision table based testing 96
equivalence class testing 85
functional testing 105
scalability testing 262
H
Heuristics for class testing 356
I
Implementation-based class testing/white box or structural testing 333
Incremental testing approach 10
Independent V&V contractor (IV&V) 49
Integration complexity 143
Integration testing of classes 367
Integration testing 237
Interoperability testing 266
K
Kiviat charts 105
L
Levels of object oriented testing 363
Levels of testing 235–291
Life cycle of a build 563
Limitations of BVA 67
Limitations of testing 19
M
Managing key resources 259
Managing the test process 383
Measurement of testing 10
Mutation testing versus error seeding 186
N
Neighborhood integration 242
Non-functional testing (or white box testing) 486
Non-functional testing techniques 258
O
Object oriented testing 301
levels of 363
P
Pairwise integration 241
Path analysis 453
process 454
coverage 138
Path-based integration with its pros and cons 243
Pathological complexity 143
Performance testing 273, 486
challenges 280
factors governing 274
steps of 279
tools for 290
Phase wise breakup over testing life cycle 453
Positive and negative effect of software V&V on projects 48
Practical challenges in white box testing 190
Principles of testing 18
Prioritization guidelines 215
Prioritization of test cases for regression testing 224
Priority category scheme 216
Problems with manual testing 413
Progressive regression testing 221
Proof of correctness (formal verification) 37
Pros and cons of decomposition-based techniques 240
Pros and cons 242
R
Rationale for STRs 43
Recoverability testing 488
Regression and acceptance testing 381
Regression testing at integration level 222
Regression testing at system level 223
Regression testing at unit level 222
Regression testing in object oriented software 224
Regression testing of a relational database 493–500
Regression testing of global variables 223
Regression testing technique 225
Regression testing 220, 381, 571
types of 221
Release acceptance test (RAT) 271
Reliability testing 262, 489
Requirements tracing 38
Response for class (RFC) 145
Responsibility-based class testing/black-box/functional specification-based testing of classes 345
Retest-all strategy 221
Risk analysis 217
Robustness testing 67
Role of V&V in SDLC 33
S
Sandwich integration approach 239
Scalability testing 260, 487
Security testing 488
Selecting test cases 269
Selection of good test cases 9
Selective strategy 221
Setting up the configuration 258
Simulation and prototyping 38
Skills needed for using automated tools 416
Slice based testing 226
Smoke testing 571
Software technical reviews 43
rationale for 43
review methodologies 46
types of 45
Software testing 2
basic terminology related to 11
Software V&V planning (SVVP) 39
Software verification and validation 29–57
Standard for software test documentation (IEEE829) 50
State machines
basic concepts of 310
Statement coverage 136
Static versus dynamic white box testing 134
Steps for tool selection 424
Steps of performance testing 279
Stress testing 263
Strong normal equivalence class testing 76
Strong robust equivalence class testing 77
System testing 246, 371
T
Test automation: “no silver bullet” 431
Test cases for commission problem 72, 96
Test cases for next date function 71, 91
Test cases for payroll problem 100
Test cases for the triangle problem 69, 90, 98
Test execution issues 394
Test point analysis (TPA) 435
for case study 450
methodology 436
model 437
philosophy 436
Testing
effectiveness 104
efficiency 104
effort 102
levels of 235–291
life cycle 17
measurement of 10
number of 9
object oriented systems 333
performance See Performance testing
principles of 18
purpose 6
Testing “around” a bug 572
Testing of e-learning management systems 505–557
Testing process 2
Testing using orthogonal arrays 392
Tools for performance testing 290
TPA. See Test point analysis
Transaction testing 489
Types of
acceptance testing 271
decomposition based techniques top-down 238
integration approach 238
RDBMS 494
regression testing 221
STRs 45
testing tools-static v/s dynamic 411
U
Unit testing a class 364
Unit, integration, system and acceptance testing relationship 236
Unit/code functional testing 135
Usability testing 486
V
Version control 567
V&V limitations 32
W
Weak normal equivalence class testing 75
Weak robust equivalence class testing 76
Web browser-page tests 489
Weighted methods for class (WMC) 145
When to stop testing 18
White box testing 486, 562. See also Black box testing
advantages of 191
comparison of black box and 188
practical challenges in 190
static versus dynamic 134
White box (or structural) testing techniques 133
Worst-case testing 68