Professional Documents
Culture Documents
Basics of Software Testing
Basics of Software Testing
Basics Of Software
Testing
Overview
• Software Quality, Definition of Software Testing,
Role of Testing
• Failure, Error, Fault, Defect, Bug Terminology
• Objectives of Testing
• Test Case
• When to Start and Stop Testing of Software (Entry
and Exit Criteria)
• Skills for Software Tester
• Quality Assurance, Quality Control, Verification
and Validation, V Model
Quality
• The concept and vocabulary of quality is elusive.
Different people interpret quality differently. Few
can define quality in measurable terms that can
be operationalized.
• the degree of excellence of something, often a
high degreeof it.
• Quality often refers to how good
or bad something is
• a characteristic or featureof someone or
something
• When asked what differentiate their product or
service, the banker will answer “service,” health
care worker will answer “quality health care,” the
hotel restaurant employee will answer “customer
satisfaction,” and the manufacturer will simply
answer “quality product.” When pressed to
provide a specific definition and measurement,
few can do so.
• Harvard professor David Garvin, in his
book Managing Quality, summarized five
principal approaches to defining quality:
transcendent, product based, user based,
manufacturing based, and value based. Let’s
discuss each one of them:
1. Transcendental View of Quality: Those who hold
transcendental view would say, “I can’t define it, but I
know when I see it.”
2. Product-Based View: Product based definitions are
different. Quality is viewed as quantifiable and
measurable characteristics or attributes.
3. User-Based View: User based definitions are based
on the idea that quality is an individual matter, and
products that best satisfy their preferences (i.e.
perceived quality) are those with the highest quality.
4. Manufacturing-Based View: Manufacturing-based
definitions are concerned primarily with engineering
and manufacturing practices and use the universal
definition of “conformance to requirements.”
5. Value-Based View: Value-based quality is defined in
terms of costs and prices as well as a number of other
attributes.
Software Quality
• SOFTWARE QUALITY is the degree of
conformance to explicit or implicit requirements
and expectations.
• Explanation
– Explicit: clearly defined and documented
– Implicit: not clearly defined and documented but
indirectly suggested
– Requirements: business/product/software
requirements
– Expectations: mainly end-user expectations
Software Testing
• Software testing is defined as an activity to check
whether the actual results match the expected
results and to ensure that the software system
is Defect free.
• It involves execution of a software component or
system component to evaluate one or more
properties of interest.
• Software testing also helps to identify errors,
gaps or missing requirements in contrary to the
actual requirements.
Why is Software Testing Important?
• Testing is important because software bugs could be
expensive or even dangerous. Software bugs can
potentially cause monetary and human loss, and history is
full of such examples.
– In April 2015, Bloomberg terminal in London crashed due to
software glitch affected more than 300,000 traders on financial
markets. It forced the government to postpone a 3bn pound
debt sale.
– Nissan cars have to recall over 1 million cars from the market
due to software failure in the airbag sensory detectors. There
has been reported two accident due to this software failure.
– Starbucks was forced to close about 60 percent of stores in the
U.S and Canada due to software failure in its POS system. At one
point store served coffee for free as they unable to process the
transaction.
Role of Software Testing
• Testing plays a vital role in software
development. In every company, testing is an
important and valuable stage in the Software
Development Life Cycle. Techniques used for
software testing differ from one company to
another. Software testing is not an easy task.
Each and every day there will be challenges in
coding as well as decoding.
• Improve Your Software
The role of testing in software development
begins with improved reliability, quality and
performance of the software. It assists a
developer to check out whether the software is
performing the right way and to assure that
software is not performing what it is not
supposed to do.
• Benefits Of Software Testing
When testing is introduced in the early stage, the
cost of fixing the bug can be reduced. Cost of fixing
the bug becomes larger when a bug is not found at
the right time.
• Quality assurance
Quality plays a vital role in today’s competitive
world. Hence a software tester plays key role in
Software Development Life Cycle for producing
quality products.
Failure, Error, Fault, Defect, Bug
• Testing is the process of identifying defects,
where a defect is any variance between actual
and expected results.
• A mistake in coding is called Error, error found
by tester is called Defect, defect accepted by
development team then it is called Bug, build
does not meet the requirements then it Is
Failure.
• DEFECT: It can be simply defined as a variance
between expected and actual. Defect is an
error found AFTER the application goes into
production
• Defect can be categorized into the following:
• Wrong: When requirements are implemented not in the right way.
This defect is a variance from the given specification. It is Wrong!
• Missing: A requirement of the customer that was not fulfilled. This
is a variance from the specifications, an indication that a
specification was not implemented, or a requirement of the
customer was not noted correctly.
• Extra: A requirement incorporated into the product that was not
given by the end customer. This is always a variance from the
specification, but may be an attribute desired by the user of the
product. However, it is considered a defect because it’s a variance
from the existing requirements.
• ERROR: An error is a mistake, misconception, or misunderstanding
on the part of a software developer. In the category of developer
we include software engineers, programmers, analysts, and testers.
For example, a developer may misunderstand a de-sign notation, or
a programmer might type a variable name incorrectly – leads to an
Error. It is the one which is generated because of wrong login, loop
or due to syntax. Error normally arises in software; it leads to
change the functionality of the program.
• BUG: A bug is the result of a coding error. An Error found in
the development environment before the product is
shipped to the customer. A programming error that causes
a program to work poorly, produce incorrect results or
crash. An error in software or hardware that causes a
program to malfunction. Bug is terminology of Tester.
• FAILURE: A failure is the inability of a software system or
component to perform its required functions within
specified performance requirements. When a defect
reaches the end customer it is called a Failure. During
development Failures are usually observed by testers.
• FAULT: An incorrect step, process or data definition in a
computer program which causes the program to perform in
an unintended or unanticipated manner. A fault is
introduced into the software as the result of an error. It is
an anomaly in the software that may cause it to behave
incorrectly, and not according to its specification. It is the
result of the error.
Objectives of Testing
• To ensure that application works as specified in requirements
document.
• To provide a bug free application
• To achieve the customer satisfaction
• To ensure that error handling has been done gracefully in the
application. In situations when user has entered incorrect data, the
application display user-friendly messages
• To establish confidence in software
• To evaluate properties of software
• To discuss the distinctions between validation testing and defect
testing
• To describe strategies for generating system test cases
• To understand the essential characteristics of tool used for test
automation
Test Case
• A TEST CASE is a set of conditions or variables under
which a tester will determine whether a system under
test satisfies requirements or works correctly.
• A test case is a document, which has a set of test data,
preconditions, expected results and postconditions,
developed for a particular test scenario in order to
verify compliance against a specific requirement.
• Test Case acts as the starting point for the test
execution, and after applying a set of input values, the
application has a definitive outcome and leaves the
system at some end point or also known as execution
postcondition.
Typical Test Case Parameters:
• Test Case ID-The ID of the test case
• Test Scenario-
• Test Case Description-The summary / objective of the test case.
• Test Steps
• Prerequisite-Any prerequisites or preconditions that must be fulfilled prior
to executing the test
• Test Data-The test data, or links to the test data, that are to be used while
conducting the test.
• Expected Result-The expected result of the test.
• Test Parameters
• Actual Result-The actual result of the test; to be filled after executing the
test.
• Environment Information-The environment (Hardware/Software/Network)
in which the test was executed.
• Comments
Writing Good Test Cases
• As far as possible, write test cases in such a way that you test only
one thing at a time. Do not overlap or complicate test cases.
Attempt to make your test cases ‘atomic’.
• Ensure that all positive scenarios AND negative scenarios are
covered.
• Language:
– Write in simple and easy-to-understand language.
– Use active voice instead of passive voice: Do this, do that.
– Use exact and consistent names (of forms, fields, etc).
• Characteristics of a good test case:
– Accurate: Exacts the purpose.
– Economical: No unnecessary steps or words.
– Traceable: Capable of being traced to requirements.
– Repeatable: Can be used to perform the test over and over.
– Reusable: Can be reused if necessary.
Example:Let us say that we need to check an input field
that can accept maximum of 10 characters.
2 Ensures that the software system meets all Ensures that the functionalities meet
the functionality. the intended behavior.
3 Verification takes place first and includes the Validation occurs after verification and
checking for documentation, code, etc. mainly involves the checking of the
overall product.