Post on 28-Mar-2016
description
Limited Business Circulation
Page:1QSIT Copyright
Software Testing Essentials 1 www.qsitglobal.com
Testing Essentials Unit 1
`QSIT- Quality Solutions for Information Technology Pvt. Ltd.,
A 706 & 707, Mittal Tower,
BANGALORE- 560 001,INDIA
URL: www.qsitglobal.com
PH: +91 80 41134334
Fax: +91 80 25597445
Software Testing Essentials 2www.qsitglobal.com
Topic Coverage
� Overview
� Definition and Principles of System Development
� Various phases of the systems development lifecycle (SDLC)
� Cross life cycle activities that overlap SDLC
� Different Models of SDLC
– Basic Models
– Extended Models
Limited Business Circulation
Page:2QSIT Copyright
Software Testing Essentials 3www.qsitglobal.com
System Development Process
This process is called the System Development
Life Cycle (SDLC) because every system is
‘born’ and eventually ‘dies’.
�A system development process is a set of activities, methods, best
practices, deliverables and automated tools that stakeholders use to
develop and maintain information systems and software.
Software Testing Essentials 4www.qsitglobal.com
Why Design Systems?
� Information is a valuable resource that needs to be managed and not wasted.
�Systems are complex
easy to miss key details – Requirement Gathering
�Ad Hoc methods frequently fail to meet requirements.
Methodology
�Need to improve chance of developing a successful system.
Standards
�Any model of a solution is better than no model.
Previous data (Best practice)
�Companies do change, so systems change. –
Enhancement
Limited Business Circulation
Page:3QSIT Copyright
Software Testing Essentials 5www.qsitglobal.com
Why Design System
Software Testing Essentials 6www.qsitglobal.com
Principles of Systems Development
� Get the Owners and Users Involved.
� Use a Problem-Solving Approach.
� Establish Phases and Activities.
� Establish standards for consistent
development and documentation.
� Justify systems as capital investments.
� Cancel project or revise scope if necessary.
� Divide and conquer.
� Design systems for growth and change.
Limited Business Circulation
Page:4QSIT Copyright
Software Testing Essentials 7www.qsitglobal.com
Software Development Life Cycle
The period of time that starts when a software product is conceived and ends when the product is no longer available for use.
Consists of many phases (usually 5-8).
Phase is a related set of software engineering activities producing a work-product which may act as input for next phase.
Each phase provides an opportunity to understand the progress in the project.
Software Testing Essentials 8www.qsitglobal.com
Software Development – Major Activities
� Three additional Activities
– Scope/Project Definition
– Project planning (early)
– Support (after implementation)
Three major PhasesAnalysis: understanding business needsDesign: conceptualizing computer-system solutionImplementation: construction, testing, and installation
Limited Business Circulation
Page:5QSIT Copyright
Software Testing Essentials 9www.qsitglobal.com
Scope/Project Definition PhaseServes as a bridge between Marketing Team and the Delivery Team
�To communicate the business acquisition with inputs
�To bring in organizational commitment for the project
�Identifying the core business need
�Setting and managing Project expectations
�To develop and link project objectives in measurable and quantifiable deliverables
�To obtain Management approval for the Project
Software Testing Essentials 10www.qsitglobal.com
Scope/Project Definition Phase
� To assess the readiness of the teams to carry out the Project
� To analyze the feasibility of the Project related work as well as
technology.
� To form the Peer Team for the Project.
� To provide adequate inputs to begin the Project
planning and execution Process.
Limited Business Circulation
Page:6QSIT Copyright
Software Testing Essentials 11www.qsitglobal.com
Planning Phase
� Confirm project feasibility
� Produce project schedule
� Staff the project
� Launch the project
Software Testing Essentials 12www.qsitglobal.com
Analysis Phase
� Gather information
� Define system requirements
� Build prototypes for discovery of requirements
� Prioritize requirements
� Generate and evaluate alternatives
� Review recommendations with management
Limited Business Circulation
Page:7QSIT Copyright
Software Testing Essentials 13www.qsitglobal.com
Design Phase
� Design and integrate the network
� Design the application architecture
� Design the user interfaces
� Design the system interfaces
� Design and integrate the database
� Prototype for design details
� Design and integrate the system controls
Software Testing Essentials 14www.qsitglobal.com
Implementation Phase
� Construct software components
� Verify and test
� Convert data
� Train users and document the system
� Install the system
Limited Business Circulation
Page:8QSIT Copyright
Software Testing Essentials 15www.qsitglobal.com
Support Phase
� Maintain the system
� Enhance the system
� Support the users
Software Testing Essentials 16www.qsitglobal.com
Cross Life Cycle Activities
� Cross life cycle activities are activities that overlap many or all phases of the methodology
– Fact-finding
– Documentation and presentation
– Feasibility analysis
– Process and project management
Limited Business Circulation
Page:9QSIT Copyright
Software Testing Essentials 17www.qsitglobal.com
Ensuring Quality Deliverables from SDLC
� Process Quality Assurance
– Process Audits: ISO
– Process Appraisals: CMMI
� Product Quality Assurance
– Testing
– Product Audits
• Configuration Management Audit
– Static Reviews
• Formal Technical Reviews- FTRs
• In-Formal Technical Reviews- InFTRs
• Inspection
� Defect Prevention & Management
Software Testing Essentials 18www.qsitglobal.com
Models of SDLC
A framework that describes the activities performed at each stage of a software development project.
� Basic Models:– Waterfall Model – Spiral model– V Model
� Extended Models– W Model– Extreme Programming– Rational Unified Process (UML)
Limited Business Circulation
Page:10QSIT Copyright
Software Testing Essentials 19www.qsitglobal.com
Waterfall Model
� One of the first models of Software
development
� Each phase or activities are found in
nearly all models proposed since
Software Testing Essentials 20www.qsitglobal.com
Waterfall Strengths
� Easy to understand, easy to use
� Provides structure to inexperienced staff
� Milestones are well understood
� Sets requirements stability
� Good for management control (plan, staff, track)
� Works well when quality is more important than cost or schedule
Limited Business Circulation
Page:11QSIT Copyright
Software Testing Essentials 21www.qsitglobal.com
Waterfall Deficiencies
� All requirements must be known upfront
� Deliverables created for each phase are considered frozen –
inhibits flexibility
� Can give a false impression of progress
� Little opportunity for customer to preview the system (until
it may be too late)
Software Testing Essentials 22www.qsitglobal.com
When to use the Waterfall Model
� Requirements are very well known
� Product definition is stable
� Technology is understood
� New version of an existing product
� Porting an existing product to a new platform.
Limited Business Circulation
Page:12QSIT Copyright
Software Testing Essentials 23www.qsitglobal.com
V Model
� A variant of the Waterfall that
emphasizes the verification and
validation of the product.
� Testing of the product is planned in
parallel with a corresponding phase of
development
Software Testing Essentials 24www.qsitglobal.com
V-Shaped Strengths
� Emphasize planning for verification and validation of the
product in early stages of product development
� Each deliverable must be testable
� Project management can track progress by milestones
� Easy to use
Limited Business Circulation
Page:13QSIT Copyright
Software Testing Essentials 25www.qsitglobal.com
V-Shaped Weaknesses
The disadvantage of the model is the coarse division into constructive work (including the implementation) on the left-hand side of the “V” and the more destructive tasks on the right-hand side.
– Here also the impression may develop that, after the implementation phase, a ready product can be delivered. A planned-in removal of defects and regression test is not given.
Software Testing Essentials 26www.qsitglobal.com
When to use the V-Shaped Model
� Excellent choice for systems requiring high reliability – hospital
patient control applications
� All requirements are known up-front
� When it can be modified to handle changing requirements
beyond analysis phase
� Solution and technology are known
Limited Business Circulation
Page:14QSIT Copyright
Software Testing Essentials 27www.qsitglobal.com
Structured Evolutionary Prototyping Model
� Developers build a prototype
during the requirements phase
� Prototype is evaluated by end
users
� Users give corrective feedback
� Developers further refine the
prototype
� When the user is satisfied, the
prototype code is brought up to the
standards needed for a final
product.
Software Testing Essentials 28www.qsitglobal.com
Structured Evolutionary Prototyping Strengths
� Customers can “see” the system requirements as they are
being gathered
� Developers learn from customers
� A more accurate end product
� Unexpected requirements accommodated
� Allows for flexible design and development
� Steady, visible signs of progress produced
� Interaction with the prototype stimulates awareness of
additional needed functionality
Limited Business Circulation
Page:15QSIT Copyright
Software Testing Essentials 29www.qsitglobal.com
Structured Evolutionary Prototyping Weaknesses
� Tendency to abandon structured program development for
“code-and-fix” development
� Bad reputation for “quick-and-dirty” methods
� Overall maintainability may be overlooked
� The customer may want the prototype delivered.
� Process may continue forever (scope creep)
Software Testing Essentials 30www.qsitglobal.com
Spiral Model
� Advantages:
– Tests covered Risk Analysis, Validation of Requirements and development
– Test phase is divided in to Module, Integration and Acceptance.
� Disadvantages:
– Testing follows Coding.
– Test Plan should be constructed after Design Phase.
– No defined activities associated with the removal of defects.
In the spiral-model a cyclical and prototyping view of Software development was shown.
Limited Business Circulation
Page:16QSIT Copyright
Software Testing Essentials 31www.qsitglobal.com
Spiral Model Representation
Modified Waterfall Model � Spiral Model
Anal
yze
Des
ign
Dev
elo
p
Imp
lem
ent
Software Testing Essentials 32www.qsitglobal.com
Summary
� From the view of testing, all of the models presented previously are deficient in various ways:
– The test activities first start after the implementation
– The connection between the various test stages and the basis for the test is not clear
– The tight link between test, debug and change tasks during the test phase is not clear
� Extended Models help to remove the above mentioned disadvantages
Limited Business Circulation
Page:17QSIT Copyright
Software Testing Essentials 33www.qsitglobal.com
Extended Model – W Model
Right hand side of the W contains not only the “destructive” test activities as in the V model but also the “constructive” change activities that are carried out as a result of the discovery of faults and defects.
Software Testing Essentials 34www.qsitglobal.com
Agile Testing
No Requirement
Specification required
Initially defined Testcases are used asRequirements.
These are then used afterthe implementation tohelp check the (sub-)product.
Limited Business Circulation
Page:18QSIT Copyright
Software Testing Essentials 35www.qsitglobal.com
Extended Model – Rational Unified Process
� Inception phase:
Are defined the objectives, initial requirements and scope of the project.
� Elaboration phase:
The requisites are refined and completed. The architect design software solutions to the requisites (functional solution)
� Construction phase:
Software solution is constructed by developers.
� Transition phase:
The components are deployed and users are trained
Software Testing Essentials 36www.qsitglobal.com
The RUP Disciplines are:
� Business Modeling: Maps the company business which relates to the project. More used in large or complex projects.
� Requirements: Collect requisites of the key users.
� Analysis & Design: Design the software requisites in UML models
� Implementation: Implements the software solution in software components and database components
� Test: Test the constructed components
� Deployment: Install components and train users in your use
� Configuration & Change Management: Maintain and manage the artifacts produced by the software team
� Project Management: Manage, plan and distribute activities of the team, focusing in quality, schedule, budget and risk attack.
� Environment: Maintain tools configuration and environment aspects in order to the development team.
Extended Model – Rational Unified Process
Limited Business Circulation
Page:19QSIT Copyright
Software Testing Essentials 37www.qsitglobal.com
End of Chapter
QUESTIONS?
Software Testing Essentials 38 www.qsitglobal.com
Testing Essentials Unit 2
QSIT- Quality Solutions for Information Technology Pvt. Ltd.,
A 806 & 807, Mittal Tower,
BANGALORE- 560 001,INDIA
URL: www.qsitglobal.com
PH: +91 80 41134334
Fax: +91 80 25597445
Limited Business Circulation
Page:20QSIT Copyright
Software Testing Essentials 39www.qsitglobal.com
Topic Coverage
� Quality Perspective
� Software testing
� Objectives of software testing
� Role of software testing
� Benefits from software testing
� Preventive and corrective actions
Software Testing Essentials 40www.qsitglobal.com
Software Product
Software
Product
Documentatio
n
Data
Procedures
Deliverable to
customer and
end user
Fit for
Environment
Data
Structur
e
People
Rules Standards
Risk: A factor that could result in
Future negative consequences;
Express as impact and likelihood
Computer
Program
Limited Business Circulation
Page:21QSIT Copyright
Software Testing Essentials 41www.qsitglobal.com
Causes of Software Defect
� Error (mistake) A human action that produces an incorrect result
� Defect (bug, fault) A flaw in a component or system that can cause the component or system to fail to perform its required function
� Failure Deviation of the component or system from its expected delivery service or result
Software Testing Essentials 42www.qsitglobal.com
How does defects affect?
� Errors in the specification, design and implementation of the software and system
� Errors in use of the system
� Environmental conditions
� Intentional damage
� Potential consequences of earlier errors, intentional damage, defects and failures
Limited Business Circulation
Page:22QSIT Copyright
Software Testing Essentials 43www.qsitglobal.com
Fundamental of Software Testing QC and QA
� Quality Control: The processes and methods used to monitor work and observe whether requirements are met.
� Quality Assurance: A planned and systematic pattern of actions necessary to provide adequate confidence that the product optimally fulfills customers' expectations.
Software Testing Essentials 44www.qsitglobal.com
Corrective and Preventive Measures
AddressingDefects
Appraisal Quality
Preventive Quality
Process Improvement
Testing Training
Process
Maturity
Metric
Program
Audits &
Assessments
Inspection
Walkthroughs
Reviews
•Data Gathering & Analysis
•Fault Analysis
•Root Cause Analysis
Limited Business Circulation
Page:23QSIT Copyright
Software Testing Essentials 45www.qsitglobal.com
Preventive Quality
Training refers to the acquisition of knowledge, skills, competencies as a result of the teaching of practical skills and knowledge that relate to specific useful Competencies
Metric programMetrics derive information from raw data with a view to help in Decision making. A measurement scale and the method used for measurement. [ISO 14598]
Audits and AssessmentsAn inspection/assessment activity that verifies compliance with plans, policies and procedures
Software Testing Essentials 46www.qsitglobal.com
Preventive Quality (con td…)
ReviewAn 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]
Walk ThroughA 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]
InspectionA 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]
Limited Business Circulation
Page:24QSIT Copyright
Software Testing Essentials 47www.qsitglobal.com
Software Testing- Definitions
� Definition (1)
– Process of exercising or evaluating a system or system component by manual or automated means to verify that it satisfies specified requirement(IEEE 83a)
� Definition (2)
– Structured process that uncovers the defects in a software product.
– Destructive in nature (dismantling the wishful assumption that code is bug-free)
� Definition (3)
– Testing is a process of executing a program with the intent of finding errors(Myers)
Software Testing Essentials 48www.qsitglobal.com
Testing Glossary
� Manual Testing
– Refers to a corrective process to meet customer requirements without
using any automation tool.
� Automated testing
– It is the process of automating the manual testing activities
Limited Business Circulation
Page:25QSIT Copyright
Software Testing Essentials 49www.qsitglobal.com
Testing Glossary
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.
Dynamic testing:
Testing that involves the execution of the software of a component or
system.
Software Testing Essentials 50www.qsitglobal.com
Testing Glossary
Functional testing:
Testing based on an analysis of the specification of the functionality of a
component or system.
Non-functional testing:
Testing the attributes of a component or system that do not relate to
functionality, e.g. reliability, efficiency, usability, maintainability and
portability.
Limited Business Circulation
Page:26QSIT Copyright
Software Testing Essentials 51www.qsitglobal.com
Software Testing- What Does it Ensure?
� Find defects in product
� Demonstrate difference between specifications and developed system
� Ensure product works with negligible risks.
� Establish confidence in the product
� Offer advise on product quality and risks
� Insight to improving testing process
Software Testing Essentials 52www.qsitglobal.com
Limitations of Software Testing
� Does not generalize system behavior
� Does not guarantee bug free product
� No substitute for good programming
Limited Business Circulation
Page:27QSIT Copyright
Software Testing Essentials 53www.qsitglobal.com
Role of Software Testing
� Primary Role
– Verification - The process of determining whether or not the products of a given phase in the lifecycle fulfill a set of established requirements
� Are we doing things right? (Process)
� Are we building the system right?
Software Testing Essentials 54www.qsitglobal.com
Role of Software Testing
– Validation - The process of evaluating a system or component, during or at the end of the development life cycle, to determine whether it satisfies specified requirements.
� Are we doing the right things? (Requirements)
� Did we build the right system?
Limited Business Circulation
Page:28QSIT Copyright
Software Testing Essentials 55www.qsitglobal.com
Role of Software Testing
� Secondary Role
– Build Confidence to “Ship the Product”
– Insight into Software Process
– Improve the Software Testing Process
Software Testing Essentials 56www.qsitglobal.com
Some Facts…About Testing...
� No substitute for good programming
� It can't prevent bugs
� Can only identify them
� However...
When testing is used in combination with good programming, you can deliver software that is of high quality, reliability and has a very low defect rate.
Limited Business Circulation
Page:29QSIT Copyright
Software Testing Essentials 57www.qsitglobal.com
Aspects that hinder effective software testing
� Belief that the system works
� Negative attitude towards effective testing
� Conflict between testers and developers
� Testing is expensive
� Delivery commitments
Software Testing Essentials 58www.qsitglobal.com
Principles of Software Testing
Early TestingTesting activities should start as early as possible in the software orsystem development life cycle and should be focused on definedobjectives
Defect ClusteringA small number of modules contain most of the defects discoveredduring pre-release testing or show the most operational failures
Avoid Pesticide paradoxIf the same tests are repeated over and over again, eventually thesame set of test cases will no longer find any new bugs. To overcomethis, the test cases need to be regularly reviewed and revised, andnew and different tests need to be written to
Testing Shows Presence of Defects
Testing can show that defects are present, but cannot prove thatthere are no defects. Testing reduces the probability of undiscovereddefects remaining in the software but even if no defects are found, itis not a proof of correctness
Limited Business Circulation
Page:30QSIT Copyright
Software Testing Essentials 59www.qsitglobal.com
Principles of Software Testing
Testing is context dependent
Testing is done differently in different contexts. Ex: Testing a retailweb site is different from testing a embedded application for anAerospace application
Absence of Errors fallacy
Finding and fixing defects does not help if the system built isunusable and does not fulfill the users’ needs and expectation
Exhaustive Testing is Impossible
Testing everything (all combinations of inputs and preconditions) isnot feasible except for trivial cases. Instead of exhaustive testing,we use risk and priorities to focus testing efforts