Software Testing
Unit 1 :Basic Of Software Testing
SOFTWARE QUALITY Fundamentals
DEFINITION
• 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
What is Software Testing
• Finding defects
• Trying to break the system
• Finding and reporting defects
• Demonstrating correct functionality
• Demonstrating incorrect functionality
• Demonstrating robustness, reliability, security,maintainability, …
• Measuring performance, reliability, …
• Evaluating and measuring quality
• Proving the software correct
• Executing pre-defined test cases
• Automatic error detection
Definition Of Software Testing
• Testing is the execution of programs with the intent of finding
defects.
• Testing is a the process of exercising a software component
using a selected set of test cases,
with the intent of revealing defects and evaluating quality.
• Software testing is a technical investigation of a product, i.e.
an empirical search for quality-related information of value to a
project’s stakeholders
Bug, Fault & Failure
• A person makes an Error
• That creates a fault in software
• That can cause a failure in operation
• Error : An error is a human action that produces the incorrect result that
results in a fault.
• Bug : The presence of error at the time of execution of the software.
• Fault : State of software caused by an error.
• Failure : Deviation of the software from its expected result. It is an event.
• Defect :A defect is an error or a bug, in the application which is created. A
programmer while designing and building the software can make mistakes or
error. These mistakes or errors mean that there are flaws in the software.
These are called defects.
Nature of errors
Categories of Software Errors:
• User interface errors such as output errors or incorrect user messages.
Function errors
Hardware defects
Incorrect program version
Requirements errors
Design errors
Documentation errors
Architecture errors
Module interface errors
Performance errors
Logic errors such as calculation errors
Why do defects occur in software?
Software is written by human beings
Who know something, but not everything
Who have skills, but aren’t perfect
Who don’t usually use rigorous methods
Who do make mistakes (errors)
Under increasing pressure to deliver to strict deadlines
No time to check, assumptions may be wrong
Systems may be incomplete
Software is complex, abstract and invisible
Hard to understand
Hard to see if it is complete or working correctly
No one person can fully understand large systems
Numerous external interfaces and dependencies
Sources of defects
Education
Developers does not understand well enough what he or she is doing
Lack of proper education leads to errors in specification,design, coding, and
testing
Communication
Developers do not know enough
Information does not reach all stakeholders
Information is lost
Oversight
Omitting to do necessary things
Transcription
Developer knows what to do but simply makes a mistake
Process
Process is not applicable for the actual situation
Process places restrictions that cause errors
Objective of testing
• To find defects before they cause a production system to fail.
• To bring the tested software, after correction of the identified defects
and retesting, to an acceptable level of quality.
• To perform the required tests efficiently and effectively, within the
limits budgetary and scheduling limitation.
• To compile a record of software errors for use in error prevention (by
corrective and preventive actions)
Test Plan
A test plan is a systematic approach to testing a
system i.e. software. The plan typically contains a
detailed understanding of what the eventual testing
workflow will be.
Test Case
A test case is a specific procedure of testing a
particular requirement.
It will include:
• Identification of specific requirement tested
• Test case success/failure criteria
• Specific steps to execute test
• Test Data
ENTRY CRITERIA
Entry Criteria for QA testing is defined as “Specific conditions or on-going activities that must be
present before a process can begin”. In the Systems Development Life Cycle it also specifies
which entry criteria are required at each phase. Additionally, it is also important to define the
time interval or required amount of lead time that an entry criteria item is available to the
process. Input can be divided into two categories. The first is what we receive from
development. The second is what we produce that acts as input to later test process steps.
The type of required input from development includes:
[Link] Requirements/Statement of Need
[Link] Document
[Link] Control
[Link] Document
The type of required input from test includes:
[Link] of available software test tools
[Link] Strategy
[Link] Plan
[Link] Incident Reports
By referencing the Entry Exit Criteria matrix, we get the clarity of the deliverables expected
from each phase. The matrix should contain “date required” and should be modified to meet the
specific goals and requirements of each test effort based on size and complexity.
EXIT CRITERIA
Exit Criteria is often viewed as a single document concluding the end of a life cycle
phase. Exit Criteria is defined as “The specific conditions or on-going activities that must
be present before a life cycle phase can be considered complete. The life cycle specifies
which exit criteria are required at each phase”. This definition identifies the intermediate
deliverables, and allows us to track them as independent events.
The type of output from test includes:
[Link] Strategy
[Link] Plan
[Link] Scripts/Test Case Specifications
[Link] Logs
[Link] Incident Report Log
[Link] Summary Report/Findings Report
By identifying the specific Exit criteria, we are able to identify and plan how these steps
and processes fit into the life cycle. All of the Exit Criteria listed above, less the Test
Summary/Findings Report; act as Entry Criteria to alter process.
Who is a SoftwareTester??..
• Software Tester is the one who performs testing and find bugs, if they
exist in the tested application.
Skills Required for Tester
• Communication skills
• Domain knowledge
• Desire to learn
• Technical skills
• Analytical skills
• Planning
• Integrity
• Curiosity
• Think from users perspective
• Be a good judge of your product
Software Quality Concept
Quality : Quality means consistently meeting customer needs in
terms of requirement, Cost and delivery schedule.
Quality of s/w is reasonably bug free, delivered on time and
within budget, meets requirements and exceptions and is
maintainable
Software Quality Concept
● Quality Control: “All defined work products and Measurable
Specifications” are compared with the output of each
process.
● Quality control focuses on operational technique and activities
used to fulfill and verify requirement of quality.
● - S/w quality involves – Series of inspection, reviews, and test
used through out the s/w process.
Quality Assurance (QA): consist of Auditing and reporting
procedure. Which are used to provide necessary data to
management. In order to make decision.
● Goal of Quality Assurance is to provide adequate confidence
that a product or services is of the and quality expected by
the customer.
● If the data provided through quality assurance identify
problems, then it is management’s responsibility to address
the problems & apply the necessary resources to resole
quality issues.
● S/w Quality Assurance is planned and systematic way to evaluate
quality of s/w product standards processes and procedures.
● SQA includes the process of insuring that standers and
procedures are established and are followed throughout the
software acquisition Life cycle.
● “ SQA consists of a means of monitoring the s/w engineering
process and methods used to insure quality ”
● Standards: Standards are the criteria’s to which the s/w product are
compared.
● Documentations Standards: Specify form and
Contents for planning, analysis and product documentation and consistency
through out a project.
● Design Standards:
Specify forms and contents of design product. They provide
rules and methods for translating the s/w requirements into the s/w design.
● Code Standards : Specify the language in which code is to written and define
any restrictions on use of language features.
● They define legal language structures, style conversions, rules for data
structure and interface.
● Procedure: Expected steps to be followed in carrying out a process.
Cost Of Quality
Cost of Quality is the total amount the company spends to achieve quality
of product.
Quality of cost is divided into cost associate with prevention, appraisal
and failure.
1. Prevention Cost: Quality Panning, Formal Technical reviews, test
equipments, staff training.
2. Appraisal Cost: Equipment Maint. [Link] process and Inter process
Inspection.
3. Failure Cost : It will not consider if there is no defect before shipping.
Verification & Validation
• Verification
• Are you building the product right?
• Software must conform to its specification
• Validation
• Are you building the right product?
• Software should do what the user really requires
What is Verification?
• Definition : The process of evaluating software to determine whether the
products of a given development phase satisfy the conditions imposed at the
start of that phase.
• Verification is a static practice of verifying documents, design, code and
program. It includes all the activities associated with producing high quality
software: inspection, design analysis and specification analysis. It is a
relatively objective process.
• Verification will help to determine whether the software is of high quality,
but it will not ensure that the system is useful. Verification is concerned with
whether the system is well-engineered and error-free.
• Methods of Verification : Static Testing
• Walkthrough
• Inspection
• Review
What is Static Testing?
Static Testing Techniques provide a powerful way to improve the quality and productivity of software development
by assisting engineers to recognize and fix their own defects early in the software development process. In this
software is tested without executing the code by doing Review, Walk Through, Inspection or Analysis etc.
Static Testing may be conducted manually or through the use of various software testing tools. It starts early in the
Software Development Life Cycle and so it is done during the Verification Process.
Static testing is not magic and it should not be considered a replacement for Dynamic Testing, but all software
organizations should consider using reviews in all major aspects of their work including requirements, design,
implementation, testing, and maintenance.
Types of defects that are easier to find during static testing are: deviations from standards, missing requirements,
design defects, non-maintainable code and inconsistent interface specifications.
Techniques of Static Testing Review - Typically used to find and eliminate errors or ambiguities in documents such as
requirements, design, test cases, etc.
Informal Review
WalkThrough
Technical Review
Inspection
Static Analysis - The code written by developers are analysed (usually by tools) for structural defects that may lead to
defects.
Static Analysis
Data Flow
Control Flow
Advantages of Static Testing:
Since static testing can start early in the life cycle, early feedback on quality issues can be
established.
By detecting defects at an early stage, rework costs are most often relatively low.
Since rework effort is substantially reduced, development productivity figures are likely to increase.
The evaluation by a team has the additional advantage that there is an exchange of information
between the participants.
Static tests contribute to an increased awareness of quality issues.
What is Validation?
• Definition: The process of evaluating software during or at the end of
the development process to determine whether it satisfies specified
requirements.
• Validation is the process of evaluating the final product to check
whether the software meets the customer expectations and
requirements. It is a dynamic mechanism of validating and testing the
actual product.
• Methods of Validation : Dynamic Testing
• Testing
• End Users
What is Dynamic Testing?
In Dynamic Testing Technique software is executed using a set of input values and its output is then
examined and compared to what is expected. Dynamic execution is applied as a technique to detect
defects and to determine the quality attributes of the code. Dynamic Testing and Static Testing are
complementary methods, as they tend to find different types of defects effectively and efficiently. But
as it does not start early in the Software Development Life Cycle hence it definitely increases the cost
of fixing defects.
It is done during Validation Process evaluating the finished product.
Dynamic Techniques are subdivided into three more categories:
Specification Based Testing : This includes both Functional Testing and Non-Functional Testing.
Structure-Based Testing
Experience Based Testing
Advantages of Dynamic Testing
Considered High-Level Exercise: It can always find errors that static testing cannot find and that is the reason
why it is considered as high-level exercise.
Improves Quality: Executing the software leads to the chances of finding more bugs in the application, so it
ensures error-free software to some extent.
Disadvantages of Dynamic Testing
Time Consuming: It is a time-consuming task because its aim is to execute the application or software and as a
result, more test cases are needed to execute.
Increases cost of Product: It is not done early in the software life cycle and hence bugs fixed in later stages
result in more cost.
Execution Costly: It requires more manpower to complete the task.
Share this post:
Verification Validation
1. Verification is a static practice of verifying documents, 1. Validation is a dynamic mechanism of validating and
design, code and program. testing the actual product.
2. It does not involve executing the code. 2. It always involves executing the code.
3. It is human based checking of documents and files. 3. It is computer based execution of program.
4. Validation uses methods like black box (functional)
4. Verification uses methods like inspections, reviews,
testing, gray box testing, and white box (structural) testing
walkthroughs, and Desk-checking etc.
etc.
5. Verification is to check whether the software conforms 5. Validation is to check whether software meets the
to specifications. customer expectations and requirements.
6. It can catch errors that validation cannot catch. It is low 6. It can catch errors that verification cannot catch. It is High
level exercise. Level Exercise.
7. Target is requirements specification, application and
7. Target is actual product-a unit, a module, a bent of
software architecture, high level, complete design, and
integrated modules, and effective final product.
database design etc.
8. Verification is done by QA team to ensure that the 8. Validation is carried out with the involvement of testing
software is as per the specifications in the SRS document. team.
9. It generally comes first-done before validation. 9. It generally follows after verification.
In the V-Model software development life cycle different steps are
followed however here we will taking a most common type of V-
model example. The V-model typically consist of the following
phases:
1. Unit Testing: Preparation of Unit Test Cases
2. Integration Testing: Preparation of Integration Test Cases
3. System Testing: Preparation of System test cases
4. Acceptance Testing: Preparation of Acceptance Test Cases