Software Testing1 Running Head: SOFTWARE TESTING Software Testing
Software Testing
-
Upload
benoy-ramachandran -
Category
Technology
-
view
3.653 -
download
0
description
Transcript of Software Testing
Software TestingBenoy R Nair 12-Oct-20091
SOFTWARE TESTING
Objectives
2
� To understand software testing and its importance.
� To understand the concepts of software quality.
� To see the different classes/ levels/ types of testing.
� To see the different test case design techniques.
� To understand the software processes related to testing in a typical software organisation.
Software TestingBenoy R Nair 12-Oct-2009
SOFTWARE TESTING
FUNDAMENTALS
3Software Testing
Benoy R Nair 12-Oct-2009
What is ‘Testing’?
� Testing
– A process of evaluating a particular product to determine whether the product contains any defects.
� Software Testing
– A process of evaluating a system by manual or automatic means and verify that it satisfies specified requirements or identify differences between expected and actual results.
4Software Testing
Benoy R Nair 12-Oct-2009
What is ‘Testing’?
� “Testing is the process of executing a program with
the intent of finding errors.”
� Testing is obviously concerned with errors, faults,
failures and incidents. A test is the act of exercising
software with test cases with an objective of
– Finding failure
– Demonstrate correct execution
5Software Testing
Benoy R Nair 12-Oct-2009
Terminology
� Errors
� Faults
– Faults of commission
– Faults of omission
� Failures
� Incidents
� Test Cases
6Software Testing
Benoy R Nair 12-Oct-2009
Why do we do ‘Testing’?
� Provide confidence in the system
� Identify areas of weakness
� Establish degree of quality
� Establish the extent that the requirements have been
met
� To provide an understanding of the whole system
� To prove that it is both usable and operable
� To provide sufficient information to allow an objective
decision on application to deploy
7Software Testing
Benoy R Nair 12-Oct-2009
Basic Questions
� How much?
� What sort?
� By whom?
� When & by when?
8Software Testing
Benoy R Nair 12-Oct-2009
SOFTWARE QUALITY
PRINCIPLES
9Software Testing
Benoy R Nair 12-Oct-2009
Quality
� Meeting the Customer’s requirements in the First time and Every time
� Much more that absence of defects
� Allows us to meet customer expectations
10Software Testing
Benoy R Nair 12-Oct-2009
Perspectives of Quality
� Transcendent
� Product based
� User based
� Development based
� Value based
11Software Testing
Benoy R Nair 12-Oct-2009
Cost of Quality
� Cost of Prevention
� Cost of Appraisal
� Cost of Failure
12Software Testing
Benoy R Nair 12-Oct-2009
Quality Assurance & Quality Control
� Quality Assurance
– Process oriented (software development)
– Defect prevention
� Quality Control
– Product oriented (quality of entire product is tested)
– Defect detention
13Software Testing
Benoy R Nair 12-Oct-2009
SOFTWARE TESTING
CLASSIFICATIONS
14Software Testing
Benoy R Nair 12-Oct-2009
Levels of Classification
� Based on Granularity
– Unit Level
– Integration Level
– System Level
� Based on Methodology
– Black Box (Functional) Testing
– White Box (Structural) Testing
15Software Testing
Benoy R Nair 12-Oct-2009
Types of Testing (contd…)
� Regression Testing
� Acceptance Testing
� Sanity Testing
� Smoke Testing
� Stress Testing
16Software Testing
Benoy R Nair 12-Oct-2009
Unit Testing
� Primary Goal
– To take the smallest piece of testable software in the application, isolate it from the remainder of the code, and determine whether it behaves exactly as you expect.
Each unit is tested separately before integrating
them into modules to test the interfaces between
modules. Unit testing has proven its value in that a large percentage of defects are identified during its
use.
17Software Testing
Benoy R Nair 12-Oct-2009
Integration Testing
� A logical extension of unit testing.
� In its simplest form, two units that have already been
tested are combined into a component and the interface between them is tested.
� Approaches:
– Big Bang
– Bottom Up
– Top Down
– Sandwich
18Software Testing
Benoy R Nair 12-Oct-2009
System Testing
� Conducted on a complete, integrated system to evaluate the system's compliance with its specified
requirements.
� Validate the software product against the
requirements specification.
� To find defects that can be exposed only by testing the entire system.
19Software Testing
Benoy R Nair 12-Oct-2009
Functional (Black Box) Testing
� Inspects specified behavior
� Selects valid and invalid inputs and determines the
correct output.
� There is no knowledge of the test object's internal
structure
20Software Testing
Benoy R Nair 12-Oct-2009
Structural (White Box) Testing
� Inspects programmed behavior
� Chooses test case inputs to exercise paths through
the code and determines the appropriate outputs
� Requires programming skills to identify all paths
through the software
21Software Testing
Benoy R Nair 12-Oct-2009
Regression Testing
� Any type of software testing that seeks to uncover software regressions.
– Test fixed bugs promptly.
– Watch for side effects of fixes.
– Write a regression test for each bug fixed.
– Identify tests that the program consistently passes and archive them.
– Focus on functional issues, not those related to design.
– Make changes (small and large) to data and find any resulting corruption.
– Trace the effects of the changes on program memory.
22Software Testing
Benoy R Nair 12-Oct-2009
Acceptance Testing
� Objective
– To provide confidence that the delivered system meets the business requirements of both sponsors and users
� By System Provider
� By Customer (UAT/ End User Testing)
23Software Testing
Benoy R Nair 12-Oct-2009
Types of Testing (contd…)
� Sanity Testing
� Smoke Testing
� Stress Testing
24Software Testing
Benoy R Nair 12-Oct-2009
TEST CASES & DESIGN TECHNIQUES
TECHNIQUES
25Software Testing
Benoy R Nair 12-Oct-2009
What is a “Test Case”?
� Triplet [I, S, O] where
– I is the Input data
– S is the state of the system at which the data will be input
– O is the expected output
� Not randomly selected, but need to be carefully
designed.
� Test Suite
– Set of all test cases
26Software Testing
Benoy R Nair 12-Oct-2009
Need for designing test cases
� Extremely large input data domain making exhaustive testing impractical
� Randomly selected test cases do not ensure completeness and may also bring in redundancy
� Number of test cases do not determine effectiveness
� Each test case should detect different errors
27Software Testing
Benoy R Nair 12-Oct-2009
Test Case Design Techniques
� White Box Testing
– Control flow testing
– Data flow testing
– Branch testing
� Black Box Testing
– Equivalence class partitioning
– Boundary value analysis
– Comparison testing
– Orthogonal array testing
– Decision table based testing & Cause effect graph
28Software Testing
Benoy R Nair 12-Oct-2009
Summary
� Testing: Integral part of software development function
– Starts with the requirements not code.
– Prevention is better than cure.
– The sooner you find the fault the cheaper it is to fix it.
– Create re-usable ‘testware’.
– Process first then tools.
– Not everyone can test well; use professional testers.
– Planned testing in a controlled environment provides objective metrics.
– To gain Return on Investment you must invest first.
29Software Testing
Benoy R Nair 12-Oct-2009