SlideShare a Scribd company logo
Risk Based Testing
and
Random Testing

Dr. Himanshu Hora
SRMS College of Engineering & Technology
Bareilly (INDIA)
Risk Based Testing
and
Random Testing
• Use of Risk Analysis and Metrics
for Software Testing
• Focus Testing to Save Time and
Money while maintaining quality
• How to develop metrics to manage
and organise large test projects
The Challenges
•
•
•
•

Time Constraints
Resource Constraints
Quality Requirements
Risk Factors:
– New technology
– Lack of knowledge
– Lack of experience

• Take Control!
Risk Analysis and Testing
Test Plan
Test Item Tree

Risk
Strategy

Risk
Identification

Testing,
Inspection etc.

Risk
Assessment

Matrix: Cost
and Probability

Risk
Mitigation

Test Metrics
Risk
Reporting
Risk
Prediction
Risk Based Testing - Theory
• The Formula

Re(f) P(f)*C(f)
– Re(f) Risk Exposure of function f
– P(f) - Probability of a fault in function f
– C(f) - Cost related to a fault in function f
Risk Based Testing - Approach
• Plan: Identify Elements to be Tested
– Logical or physical Functions, Modules etc.

• Identify Risk Indicators
– What is important to predict the probability of faults?

• Identify Cost of faults
• Identify Critical Elements
– I.e. functions, tasks, activities etc. based on Risk Analysis
(Indicators and Cost)

• Execute: Improve the Test Process and Organization:
Schedule and Track
Simple Test Metrics
• Test Planning
– Number of test cases per function
– Number of hours testing per function

• Progress Tracking
–
–
–
–

Number of tests planned, executed and completed
Number of faults per function
Number of hours used for test and fix
Estimated to Complete

• Probability of faults - Indicators
–
–
–
–

New functionality
Size
Complexity
Quality of previous phases and documents

• Cost of Faults
Risk Based Testing - Metrics
• Identify Areas with “High Risk Exposure”
– Probability and Cost

• All functions/modules should be tested to a
“minimum level”

• “Extra Testing” in areas with high risk exposure
• Establish Test Plan and Schedule
– Monitor Quality
• Number of Faults per function and time

– Monitor Progress
• Number of hours in test and fix -> ETC
Risk Based Testing - Example
Ranking the functions based on Risk Exposure
The Probability of a Fault
The Cost of a Fault

C(c) C(s)
Re(f) P(f)*
2

Example:
Cost
Func.

Probability
New Design
Func. Quality Size
5
5
1

Risk

Com- Weighted Exp.
plexity Averag func.
3
f

C( s )

C(c)

Avr.

Interest
Calc.

3

3

3

2

3

3

3

37

111

Close
Account

1

3

2

2

2

2

3

31

62

Cust.
Profitab.

2

1

1,5

3

3

2

3

41

61,5

Other Probability Factors might include: Function Points, Frequency of Use etc.
High

Probability

Risk Based Testing
- Reporting

1

2
3
4

TECHNICAL
INTERFACE
RISK

10

1

Low
Low

440

Low Medium

Probability

High

510

439

11

2

2

370
369

5

302
Low

Low

Medium

Medium
BUSINESS RISK

High

High

Consequence

Consequence

High
Risk Based Testing - Practice
Prior to test execution:
identify critical transactions
1

Test Execution
identifies
“bad” transactions

“Top-20”

2

Extra Testing:
- Additional testing by product specialist
- Automated regression testing
3
Planning and Progress Tracking

Number of Test
Cases

On-line Test Cases Completed

Planned
Executed

QAed
Date

Started
Planned
Actual
Progress Indicators - “To be vs. Actual”

“To be
Retested”
vs.
“Actually
Retested”

To Be Fixed

Actually fixed

To Be Restested, Actually Retested and Rejected
Number of Faults

• “To be fixed”
vs.
“Actually fixed”

Number of Faults

To Be Fixed and Actually Fixed

To be retested

Act. retested
Rejected
Progress Indicators - Hours Used
Number of hours
for finding one
fault and for
fixing one

Hours per Fault for Test and Fix
Hours per Fault

Online

Batch

Fix

Hours per Fault for Test and Fix
Hours per Fault

Number of hours
for finding one
fault and for
fixing one

Test

Fix

Test

Date
“Estimated to Complete”
• ETC for system test based on:

Hours ETC

– Number of hours testing per fault found
– Number of hours fixing per fault
– Number of
faults found
Calculated ETC and Actual Hours
per function
Actual to Complete
– Number of
at Time t
fixes being
rejected
– Number of
remaining
tests
(functions
to be tested)
Date
Estimated to Complete at Time t
Benefits of Risk Based Testing
• Improved Quality?
– all critical functions tested

• Reduced Time and Money in Testing
– effort not wasted on non critical or low risk
functions

• Improved customer confidence
– due to customer involvement and good reporting
and progress tracking
Test Process Work Flow
Risk Identification

Risk Assessment
Basic Test
Data

PD

LD

Case Quality
Standards

Test Exec.
Procedure

Test Case

Case Build
Procedure

Test
Completed

QC / QA

Good
Test Exec

Risk Mitigation

Good/
Bad
Bad

PTDs
Raised

Risk Reporting
Retest

Risk Prediction

Problem Mngmnt.
Procedure

Fix

Fix Procedure

CR

Change Mngmnt.
Procedure

Regression
Test

ProAte
Summary
• Risk Based Test Approach
– Focused Testing
• Reduced Resources
• Improved Quality

– Metrics are fundamental

• Process and Organization must support the
new strategy
– Metrics must support the organization and
process
Random testing
– Start off with a practical look, and some useful
ideas to get you started on the project: random
testing for file systems
– Then take a deeper look at the notion of feedback
and why it is useful: method for testing OO
systems from ICSE a couple of years
• Then back out to take a look at the general idea of
random testing, if time permits
A Little Background
– Generate program inputs at random
– Drawn from some (possibly changing) probability
distribution
“Throw darts at the state space, without drawing a
bullseye”
– May generate the same test (or equivalent tests)
many times
– Will perform operations no sane human would
ever perform
Random Testing
• Millions of operations and scenarios, automatically
generated
• Run on fast & inexpensive workstations
• Results checked automatically by a reference oracle
• Hardware simulation for fault injection and reset
simulation
(x 100000)

A day (& night) of testing

(x 100000)
(x 100000)

(x 100000)
The Goals
• Randomize early testing (since it is not possible
to be exhaustive)
– We don’t know where the bugs are

Nominal
Scenario Tests

Randomized
Testing
The Goals
• Make use of desktop hardware for early testing – vs.
expensive (sloooow) flight hardware testbeds
– Many faults can be exposed without full bit-level
hardware simulation
The Goals
• Automate early testing
– Run tests all the time, in the background, while continuing
development efforts

• Automate test evaluation
– Using reference systems for fault detection and diagnosis
– Automated test minimization techniques to speed
debugging and increase regression test effectiveness

• Automate fault injection
– Simulate hardware failures in a controlled test
environment
Random testing
• Simulated flash hardware layer allows random
fault injection
• Most development/early testing can be done
on workstations
• Lots of available compute power – can cover
many system behaviors
• Will stress software in ways nominal testing will
not
Differential Testing
• How can we tell if a test succeeds?
– POSIX standard for file system operations
• IEEE produced, ANSI/ISO recognized standard for file
systems
• Defines operations and what they should do/return,
including nominal and fault behavior
File system
/
POSIX operation

Result

mkdir (“/eng”, …)
mkdir (“/data”, …)
creat (“/data/image01”, …)
creat (“/eng/fsw/code”, …)
mkdir (“/data/telemetry”, …)
unlink (“/data/image01”)

SUCCESS
SUCCESS
SUCCESS
ENOENT
SUCCESS
SUCCESS

/eng

/data

image01

/telemetry
Differential Testing
• How can we tell if a test succeeds?
– The POSIX standard specifies (mostly) what correct
behavior is
– We have heavily tested implementations of the
POSIX standard in every flavor of UNIX, readily
available to us
– We can use UNIX file systems (ext3fs, tmpfs, etc.) as
reference systems to verify the correct behavior of
flash
– First differential approach (published)
was McKeeman’s testing for compilers
Random Differential Testing
Choose (POSIX) operation F

Perform F on NVFS

Perform F on Reference
(if applicable)

Compare return values
Compare error codes
Compare file systems
Check invariants

(inject a fault?)
Don’t Use Random Testing for Everything!
• Why not test handing read a null pointer?
– Because (assuming the code is correct) it guarantees
some portion of test operations will not induce failure
– But if the code is incorrect, it’s easier and more
efficient to write a single test
– The file system state doesn’t have any impact (we
hope!) on whether there is a null check for the buffer
passed to read

• But we have to remember to actually do these
non-random fixed tests, or we may miss critical,
easy-to-find bugs!
Principles Used
•
•
•
•

Random testing (with feedback)
Test automation
Hardware simulation & fault injection
Use of a well-tested reference implementation
as oracle (differential testing)
• Automatic test minimization (delta-debugging)
• Design for testability
– Assertions
– Downward scalability (small model property)
– Preference for predictability
Synopsis
• Random testing is sometimes a powerful
method and could likely be applied more
broadly in other missions
– Already applied to four file system-related
development efforts
– Part or all of this approach is applicable to
other critical components (esp. with better
models to use as references)
Thank You

Dr. Himanshu Hora
SRMS College of Engineering & Technology
Bareilly (INDIA)

More Related Content

What's hot

Chapter 5 - Test Management
Chapter 5 - Test ManagementChapter 5 - Test Management
Chapter 5 - Test Management
Neeraj Kumar Singh
 
How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy Impetus Technologies
 
Seven testing principles
Seven testing principlesSeven testing principles
Seven testing principles
Vaibhav Dash
 
Test Estimation Techniques
Test Estimation TechniquesTest Estimation Techniques
Test Estimation TechniquesNishant Worah
 
ISTQB - Software development life cycle
ISTQB - Software development life cycleISTQB - Software development life cycle
ISTQB - Software development life cycle
HoangThiHien1
 
Building a Test Automation Strategy for Success
Building a Test Automation Strategy for SuccessBuilding a Test Automation Strategy for Success
Building a Test Automation Strategy for Success
Lee Barnes
 
New trends in testing automation
New trends in testing automationNew trends in testing automation
New trends in testing automation
Eran Kinsbrunner
 
Software testing - Risk management
Software testing - Risk managementSoftware testing - Risk management
Software testing - Risk management
PractiTest
 
Automation Best Practices
Automation Best PracticesAutomation Best Practices
Automation Best Practices
Sauce Labs
 
Test Automation - Keytorc Approach
Test Automation - Keytorc Approach Test Automation - Keytorc Approach
Test Automation - Keytorc Approach
Keytorc Software Testing Services
 
Iseb, ISTQB Static Testing
Iseb, ISTQB Static TestingIseb, ISTQB Static Testing
Iseb, ISTQB Static Testing
onsoftwaretest
 
Test Planning
Test PlanningTest Planning
Test Planning
Nivetha Padmanaban
 
Fundamentals of testing
Fundamentals of testingFundamentals of testing
Fundamentals of testing
BugRaptors
 
ISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture NotesISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture Notes
onsoftwaretest
 
Chapter 5 - Reviews
Chapter 5 - ReviewsChapter 5 - Reviews
Chapter 5 - Reviews
Neeraj Kumar Singh
 
Agile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile TesterAgile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile Tester
Declan Whelan
 
7 testing principles
7 testing principles7 testing principles
7 testing principles
Testing Expert
 
Test Management introduction
Test Management introductionTest Management introduction
Test Management introductionOana Feidi
 
Software testing
Software testingSoftware testing
ISTQB foundation level - day 2
ISTQB foundation level - day 2ISTQB foundation level - day 2
ISTQB foundation level - day 2
Shuchi Singla AKT,SPC4,PMI-ACP,ITIL(F),CP-AAT
 

What's hot (20)

Chapter 5 - Test Management
Chapter 5 - Test ManagementChapter 5 - Test Management
Chapter 5 - Test Management
 
How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy How to Design a Successful Test Automation Strategy
How to Design a Successful Test Automation Strategy
 
Seven testing principles
Seven testing principlesSeven testing principles
Seven testing principles
 
Test Estimation Techniques
Test Estimation TechniquesTest Estimation Techniques
Test Estimation Techniques
 
ISTQB - Software development life cycle
ISTQB - Software development life cycleISTQB - Software development life cycle
ISTQB - Software development life cycle
 
Building a Test Automation Strategy for Success
Building a Test Automation Strategy for SuccessBuilding a Test Automation Strategy for Success
Building a Test Automation Strategy for Success
 
New trends in testing automation
New trends in testing automationNew trends in testing automation
New trends in testing automation
 
Software testing - Risk management
Software testing - Risk managementSoftware testing - Risk management
Software testing - Risk management
 
Automation Best Practices
Automation Best PracticesAutomation Best Practices
Automation Best Practices
 
Test Automation - Keytorc Approach
Test Automation - Keytorc Approach Test Automation - Keytorc Approach
Test Automation - Keytorc Approach
 
Iseb, ISTQB Static Testing
Iseb, ISTQB Static TestingIseb, ISTQB Static Testing
Iseb, ISTQB Static Testing
 
Test Planning
Test PlanningTest Planning
Test Planning
 
Fundamentals of testing
Fundamentals of testingFundamentals of testing
Fundamentals of testing
 
ISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture NotesISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture Notes
 
Chapter 5 - Reviews
Chapter 5 - ReviewsChapter 5 - Reviews
Chapter 5 - Reviews
 
Agile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile TesterAgile Testing: The Role Of The Agile Tester
Agile Testing: The Role Of The Agile Tester
 
7 testing principles
7 testing principles7 testing principles
7 testing principles
 
Test Management introduction
Test Management introductionTest Management introduction
Test Management introduction
 
Software testing
Software testingSoftware testing
Software testing
 
ISTQB foundation level - day 2
ISTQB foundation level - day 2ISTQB foundation level - day 2
ISTQB foundation level - day 2
 

Viewers also liked

Practical Application Of Risk Based Testing Methods
Practical Application Of Risk Based Testing MethodsPractical Application Of Risk Based Testing Methods
Practical Application Of Risk Based Testing MethodsReuben Korngold
 
Building a software testing environment
Building a software testing environmentBuilding a software testing environment
Building a software testing environment
Himanshu
 
Test Environment Management Maturity Model
Test Environment Management Maturity ModelTest Environment Management Maturity Model
Test Environment Management Maturity Model
crawforn992
 
Environment Delivery Management Services
Environment Delivery Management  ServicesEnvironment Delivery Management  Services
Environment Delivery Management Servicesdrummondrj
 
Managing Test Environments
Managing Test EnvironmentsManaging Test Environments
Managing Test EnvironmentsKevin Harvey
 
Test Environment Management KPI
Test Environment Management KPITest Environment Management KPI
Test Environment Management KPI
Valentine Wats
 
Test Environment Strategy
Test Environment StrategyTest Environment Strategy
Test Environment StrategyTony Barber
 
Test Environment Management
Test Environment ManagementTest Environment Management
Test Environment Management
Kanoah
 

Viewers also liked (8)

Practical Application Of Risk Based Testing Methods
Practical Application Of Risk Based Testing MethodsPractical Application Of Risk Based Testing Methods
Practical Application Of Risk Based Testing Methods
 
Building a software testing environment
Building a software testing environmentBuilding a software testing environment
Building a software testing environment
 
Test Environment Management Maturity Model
Test Environment Management Maturity ModelTest Environment Management Maturity Model
Test Environment Management Maturity Model
 
Environment Delivery Management Services
Environment Delivery Management  ServicesEnvironment Delivery Management  Services
Environment Delivery Management Services
 
Managing Test Environments
Managing Test EnvironmentsManaging Test Environments
Managing Test Environments
 
Test Environment Management KPI
Test Environment Management KPITest Environment Management KPI
Test Environment Management KPI
 
Test Environment Strategy
Test Environment StrategyTest Environment Strategy
Test Environment Strategy
 
Test Environment Management
Test Environment ManagementTest Environment Management
Test Environment Management
 

Similar to Risk based testing and random testing

Software engineering quality assurance and testing
Software engineering quality assurance and testingSoftware engineering quality assurance and testing
Software engineering quality assurance and testing
Bipul Roy Bpl
 
NG_TEST_Presentation_0510
NG_TEST_Presentation_0510NG_TEST_Presentation_0510
NG_TEST_Presentation_0510techweb08
 
NG_TEST_SR_Presentation
NG_TEST_SR_PresentationNG_TEST_SR_Presentation
NG_TEST_SR_Presentationtechweb08
 
NGTEST_Presentation
NGTEST_PresentationNGTEST_Presentation
NGTEST_Presentationtechweb08
 
Software Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet SolutionSoftware Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet Solution
Mazenetsolution
 
ISTQBCH foundation level chapter 01 fundamentals of testing
ISTQBCH foundation level chapter 01 fundamentals of testingISTQBCH foundation level chapter 01 fundamentals of testing
ISTQBCH foundation level chapter 01 fundamentals of testing
KhalilSalhi5
 
1
11
ISTQBCH2.ppt
ISTQBCH2.pptISTQBCH2.ppt
ISTQBCH2.ppt
RppsKumar1
 
ISTQBCH2.ppt
ISTQBCH2.pptISTQBCH2.ppt
ISTQBCH2.ppt
ghkadous
 
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
ShudipPal
 
Testing- Fundamentals of Testing-Mazenet solution
Testing- Fundamentals of Testing-Mazenet solutionTesting- Fundamentals of Testing-Mazenet solution
Testing- Fundamentals of Testing-Mazenet solution
Mazenetsolution
 
Istqb foundation level day 1
Istqb foundation level   day 1Istqb foundation level   day 1
Istqb foundation level day 1
Shuchi Singla AKT,SPC4,PMI-ACP,ITIL(F),CP-AAT
 
Class9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfClass9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdf
FarjanaParvin5
 
ISTQB Foundation - Chapter 2
ISTQB Foundation - Chapter 2ISTQB Foundation - Chapter 2
ISTQB Foundation - Chapter 2
Chandukar
 
Software testing-and-analysis
Software testing-and-analysisSoftware testing-and-analysis
Software testing-and-analysis
WBUTTUTORIALS
 
ISTQB, ISEB Lecture Notes- 2
ISTQB, ISEB Lecture Notes- 2ISTQB, ISEB Lecture Notes- 2
ISTQB, ISEB Lecture Notes- 2
onsoftwaretest
 
ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1Yogindernath Gupta
 
Context-Driven Performance Testing
Context-Driven Performance TestingContext-Driven Performance Testing
Context-Driven Performance Testing
Alexander Podelko
 
Software engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit designSoftware engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit design
Maitree Patel
 
SENG202-v-and-v-modeling_121810.pptx
SENG202-v-and-v-modeling_121810.pptxSENG202-v-and-v-modeling_121810.pptx
SENG202-v-and-v-modeling_121810.pptx
MinsasWorld
 

Similar to Risk based testing and random testing (20)

Software engineering quality assurance and testing
Software engineering quality assurance and testingSoftware engineering quality assurance and testing
Software engineering quality assurance and testing
 
NG_TEST_Presentation_0510
NG_TEST_Presentation_0510NG_TEST_Presentation_0510
NG_TEST_Presentation_0510
 
NG_TEST_SR_Presentation
NG_TEST_SR_PresentationNG_TEST_SR_Presentation
NG_TEST_SR_Presentation
 
NGTEST_Presentation
NGTEST_PresentationNGTEST_Presentation
NGTEST_Presentation
 
Software Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet SolutionSoftware Testing- Principles of testing- Mazenet Solution
Software Testing- Principles of testing- Mazenet Solution
 
ISTQBCH foundation level chapter 01 fundamentals of testing
ISTQBCH foundation level chapter 01 fundamentals of testingISTQBCH foundation level chapter 01 fundamentals of testing
ISTQBCH foundation level chapter 01 fundamentals of testing
 
1
11
1
 
ISTQBCH2.ppt
ISTQBCH2.pptISTQBCH2.ppt
ISTQBCH2.ppt
 
ISTQBCH2.ppt
ISTQBCH2.pptISTQBCH2.ppt
ISTQBCH2.ppt
 
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
Software Engineering (Software Quality Assurance & Testing: Supplementary Mat...
 
Testing- Fundamentals of Testing-Mazenet solution
Testing- Fundamentals of Testing-Mazenet solutionTesting- Fundamentals of Testing-Mazenet solution
Testing- Fundamentals of Testing-Mazenet solution
 
Istqb foundation level day 1
Istqb foundation level   day 1Istqb foundation level   day 1
Istqb foundation level day 1
 
Class9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfClass9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdf
 
ISTQB Foundation - Chapter 2
ISTQB Foundation - Chapter 2ISTQB Foundation - Chapter 2
ISTQB Foundation - Chapter 2
 
Software testing-and-analysis
Software testing-and-analysisSoftware testing-and-analysis
Software testing-and-analysis
 
ISTQB, ISEB Lecture Notes- 2
ISTQB, ISEB Lecture Notes- 2ISTQB, ISEB Lecture Notes- 2
ISTQB, ISEB Lecture Notes- 2
 
ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1ISTQB / ISEB Foundation Exam Practice -1
ISTQB / ISEB Foundation Exam Practice -1
 
Context-Driven Performance Testing
Context-Driven Performance TestingContext-Driven Performance Testing
Context-Driven Performance Testing
 
Software engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit designSoftware engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit design
 
SENG202-v-and-v-modeling_121810.pptx
SENG202-v-and-v-modeling_121810.pptxSENG202-v-and-v-modeling_121810.pptx
SENG202-v-and-v-modeling_121810.pptx
 

More from Himanshu

Structural patterns
Structural patternsStructural patterns
Structural patterns
Himanshu
 
Software product line
Software product lineSoftware product line
Software product line
Himanshu
 
Shared information systems
Shared information systemsShared information systems
Shared information systems
Himanshu
 
Saam
SaamSaam
Saam
Himanshu
 
Design Pattern
Design PatternDesign Pattern
Design Pattern
Himanshu
 
Creational pattern
Creational patternCreational pattern
Creational pattern
Himanshu
 
Architecture Review
Architecture ReviewArchitecture Review
Architecture Review
Himanshu
 
Reliability and its principals
Reliability and its principalsReliability and its principals
Reliability and its principals
Himanshu
 
Structural and functional testing
Structural and functional testingStructural and functional testing
Structural and functional testing
Himanshu
 
White box black box & gray box testing
White box black box & gray box testingWhite box black box & gray box testing
White box black box & gray box testing
Himanshu
 
Pareto analysis
Pareto analysisPareto analysis
Pareto analysis
Himanshu
 
Load runner & win runner
Load runner & win runnerLoad runner & win runner
Load runner & win runner
Himanshu
 
Crud and jad
Crud and jadCrud and jad
Crud and jad
Himanshu
 
Junit and cactus
Junit and cactusJunit and cactus
Junit and cactus
Himanshu
 
Testing a data warehouses
Testing a data warehousesTesting a data warehouses
Testing a data warehouses
Himanshu
 
Software testing tools and its taxonomy
Software testing tools and its taxonomySoftware testing tools and its taxonomy
Software testing tools and its taxonomy
Himanshu
 
Software reliability engineering process
Software reliability engineering processSoftware reliability engineering process
Software reliability engineering process
Himanshu
 
Software reliability growth model
Software reliability growth modelSoftware reliability growth model
Software reliability growth model
Himanshu
 
Software reliability tools and common software errors
Software reliability tools and common software errorsSoftware reliability tools and common software errors
Software reliability tools and common software errors
Himanshu
 
Regression and performance testing
Regression and performance testingRegression and performance testing
Regression and performance testing
Himanshu
 

More from Himanshu (20)

Structural patterns
Structural patternsStructural patterns
Structural patterns
 
Software product line
Software product lineSoftware product line
Software product line
 
Shared information systems
Shared information systemsShared information systems
Shared information systems
 
Saam
SaamSaam
Saam
 
Design Pattern
Design PatternDesign Pattern
Design Pattern
 
Creational pattern
Creational patternCreational pattern
Creational pattern
 
Architecture Review
Architecture ReviewArchitecture Review
Architecture Review
 
Reliability and its principals
Reliability and its principalsReliability and its principals
Reliability and its principals
 
Structural and functional testing
Structural and functional testingStructural and functional testing
Structural and functional testing
 
White box black box & gray box testing
White box black box & gray box testingWhite box black box & gray box testing
White box black box & gray box testing
 
Pareto analysis
Pareto analysisPareto analysis
Pareto analysis
 
Load runner & win runner
Load runner & win runnerLoad runner & win runner
Load runner & win runner
 
Crud and jad
Crud and jadCrud and jad
Crud and jad
 
Junit and cactus
Junit and cactusJunit and cactus
Junit and cactus
 
Testing a data warehouses
Testing a data warehousesTesting a data warehouses
Testing a data warehouses
 
Software testing tools and its taxonomy
Software testing tools and its taxonomySoftware testing tools and its taxonomy
Software testing tools and its taxonomy
 
Software reliability engineering process
Software reliability engineering processSoftware reliability engineering process
Software reliability engineering process
 
Software reliability growth model
Software reliability growth modelSoftware reliability growth model
Software reliability growth model
 
Software reliability tools and common software errors
Software reliability tools and common software errorsSoftware reliability tools and common software errors
Software reliability tools and common software errors
 
Regression and performance testing
Regression and performance testingRegression and performance testing
Regression and performance testing
 

Recently uploaded

"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
IreneSebastianRueco1
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
thanhdowork
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
RitikBhardwaj56
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
Academy of Science of South Africa
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
vaibhavrinwa19
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Akanksha trivedi rama nursing college kanpur.
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
Delapenabediema
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
Celine George
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
Krisztián Száraz
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Thiyagu K
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
Thiyagu K
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
Israel Genealogy Research Association
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
heathfieldcps1
 

Recently uploaded (20)

"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
RPMS TEMPLATE FOR SCHOOL YEAR 2023-2024 FOR TEACHER 1 TO TEACHER 3
 
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptxChapter 4 - Islamic Financial Institutions in Malaysia.pptx
Chapter 4 - Islamic Financial Institutions in Malaysia.pptx
 
A Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptxA Survey of Techniques for Maximizing LLM Performance.pptx
A Survey of Techniques for Maximizing LLM Performance.pptx
 
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...The simplified electron and muon model, Oscillating Spacetime: The Foundation...
The simplified electron and muon model, Oscillating Spacetime: The Foundation...
 
South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)South African Journal of Science: Writing with integrity workshop (2024)
South African Journal of Science: Writing with integrity workshop (2024)
 
Acetabularia Information For Class 9 .docx
Acetabularia Information For Class 9  .docxAcetabularia Information For Class 9  .docx
Acetabularia Information For Class 9 .docx
 
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama UniversityNatural birth techniques - Mrs.Akanksha Trivedi Rama University
Natural birth techniques - Mrs.Akanksha Trivedi Rama University
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
The Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official PublicationThe Challenger.pdf DNHS Official Publication
The Challenger.pdf DNHS Official Publication
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
How to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold MethodHow to Build a Module in Odoo 17 Using the Scaffold Method
How to Build a Module in Odoo 17 Using the Scaffold Method
 
Advantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO PerspectiveAdvantages and Disadvantages of CMS from an SEO Perspective
Advantages and Disadvantages of CMS from an SEO Perspective
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
Unit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdfUnit 2- Research Aptitude (UGC NET Paper I).pdf
Unit 2- Research Aptitude (UGC NET Paper I).pdf
 
Unit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdfUnit 8 - Information and Communication Technology (Paper I).pdf
Unit 8 - Information and Communication Technology (Paper I).pdf
 
The Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collectionThe Diamonds of 2023-2024 in the IGRA collection
The Diamonds of 2023-2024 in the IGRA collection
 
The basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptxThe basics of sentences session 5pptx.pptx
The basics of sentences session 5pptx.pptx
 

Risk based testing and random testing

  • 1. Risk Based Testing and Random Testing Dr. Himanshu Hora SRMS College of Engineering & Technology Bareilly (INDIA)
  • 2. Risk Based Testing and Random Testing • Use of Risk Analysis and Metrics for Software Testing • Focus Testing to Save Time and Money while maintaining quality • How to develop metrics to manage and organise large test projects
  • 3. The Challenges • • • • Time Constraints Resource Constraints Quality Requirements Risk Factors: – New technology – Lack of knowledge – Lack of experience • Take Control!
  • 4. Risk Analysis and Testing Test Plan Test Item Tree Risk Strategy Risk Identification Testing, Inspection etc. Risk Assessment Matrix: Cost and Probability Risk Mitigation Test Metrics Risk Reporting Risk Prediction
  • 5. Risk Based Testing - Theory • The Formula Re(f) P(f)*C(f) – Re(f) Risk Exposure of function f – P(f) - Probability of a fault in function f – C(f) - Cost related to a fault in function f
  • 6. Risk Based Testing - Approach • Plan: Identify Elements to be Tested – Logical or physical Functions, Modules etc. • Identify Risk Indicators – What is important to predict the probability of faults? • Identify Cost of faults • Identify Critical Elements – I.e. functions, tasks, activities etc. based on Risk Analysis (Indicators and Cost) • Execute: Improve the Test Process and Organization: Schedule and Track
  • 7. Simple Test Metrics • Test Planning – Number of test cases per function – Number of hours testing per function • Progress Tracking – – – – Number of tests planned, executed and completed Number of faults per function Number of hours used for test and fix Estimated to Complete • Probability of faults - Indicators – – – – New functionality Size Complexity Quality of previous phases and documents • Cost of Faults
  • 8. Risk Based Testing - Metrics • Identify Areas with “High Risk Exposure” – Probability and Cost • All functions/modules should be tested to a “minimum level” • “Extra Testing” in areas with high risk exposure • Establish Test Plan and Schedule – Monitor Quality • Number of Faults per function and time – Monitor Progress • Number of hours in test and fix -> ETC
  • 9. Risk Based Testing - Example Ranking the functions based on Risk Exposure The Probability of a Fault The Cost of a Fault C(c) C(s) Re(f) P(f)* 2 Example: Cost Func. Probability New Design Func. Quality Size 5 5 1 Risk Com- Weighted Exp. plexity Averag func. 3 f C( s ) C(c) Avr. Interest Calc. 3 3 3 2 3 3 3 37 111 Close Account 1 3 2 2 2 2 3 31 62 Cust. Profitab. 2 1 1,5 3 3 2 3 41 61,5 Other Probability Factors might include: Function Points, Frequency of Use etc.
  • 10. High Probability Risk Based Testing - Reporting 1 2 3 4 TECHNICAL INTERFACE RISK 10 1 Low Low 440 Low Medium Probability High 510 439 11 2 2 370 369 5 302 Low Low Medium Medium BUSINESS RISK High High Consequence Consequence High
  • 11. Risk Based Testing - Practice Prior to test execution: identify critical transactions 1 Test Execution identifies “bad” transactions “Top-20” 2 Extra Testing: - Additional testing by product specialist - Automated regression testing 3
  • 12. Planning and Progress Tracking Number of Test Cases On-line Test Cases Completed Planned Executed QAed Date Started Planned Actual
  • 13. Progress Indicators - “To be vs. Actual” “To be Retested” vs. “Actually Retested” To Be Fixed Actually fixed To Be Restested, Actually Retested and Rejected Number of Faults • “To be fixed” vs. “Actually fixed” Number of Faults To Be Fixed and Actually Fixed To be retested Act. retested Rejected
  • 14. Progress Indicators - Hours Used Number of hours for finding one fault and for fixing one Hours per Fault for Test and Fix Hours per Fault Online Batch Fix Hours per Fault for Test and Fix Hours per Fault Number of hours for finding one fault and for fixing one Test Fix Test Date
  • 15. “Estimated to Complete” • ETC for system test based on: Hours ETC – Number of hours testing per fault found – Number of hours fixing per fault – Number of faults found Calculated ETC and Actual Hours per function Actual to Complete – Number of at Time t fixes being rejected – Number of remaining tests (functions to be tested) Date Estimated to Complete at Time t
  • 16. Benefits of Risk Based Testing • Improved Quality? – all critical functions tested • Reduced Time and Money in Testing – effort not wasted on non critical or low risk functions • Improved customer confidence – due to customer involvement and good reporting and progress tracking
  • 17. Test Process Work Flow Risk Identification Risk Assessment Basic Test Data PD LD Case Quality Standards Test Exec. Procedure Test Case Case Build Procedure Test Completed QC / QA Good Test Exec Risk Mitigation Good/ Bad Bad PTDs Raised Risk Reporting Retest Risk Prediction Problem Mngmnt. Procedure Fix Fix Procedure CR Change Mngmnt. Procedure Regression Test ProAte
  • 18. Summary • Risk Based Test Approach – Focused Testing • Reduced Resources • Improved Quality – Metrics are fundamental • Process and Organization must support the new strategy – Metrics must support the organization and process
  • 19. Random testing – Start off with a practical look, and some useful ideas to get you started on the project: random testing for file systems – Then take a deeper look at the notion of feedback and why it is useful: method for testing OO systems from ICSE a couple of years • Then back out to take a look at the general idea of random testing, if time permits
  • 20. A Little Background – Generate program inputs at random – Drawn from some (possibly changing) probability distribution “Throw darts at the state space, without drawing a bullseye” – May generate the same test (or equivalent tests) many times – Will perform operations no sane human would ever perform
  • 21. Random Testing • Millions of operations and scenarios, automatically generated • Run on fast & inexpensive workstations • Results checked automatically by a reference oracle • Hardware simulation for fault injection and reset simulation (x 100000) A day (& night) of testing (x 100000) (x 100000) (x 100000)
  • 22. The Goals • Randomize early testing (since it is not possible to be exhaustive) – We don’t know where the bugs are Nominal Scenario Tests Randomized Testing
  • 23. The Goals • Make use of desktop hardware for early testing – vs. expensive (sloooow) flight hardware testbeds – Many faults can be exposed without full bit-level hardware simulation
  • 24. The Goals • Automate early testing – Run tests all the time, in the background, while continuing development efforts • Automate test evaluation – Using reference systems for fault detection and diagnosis – Automated test minimization techniques to speed debugging and increase regression test effectiveness • Automate fault injection – Simulate hardware failures in a controlled test environment
  • 25. Random testing • Simulated flash hardware layer allows random fault injection • Most development/early testing can be done on workstations • Lots of available compute power – can cover many system behaviors • Will stress software in ways nominal testing will not
  • 26. Differential Testing • How can we tell if a test succeeds? – POSIX standard for file system operations • IEEE produced, ANSI/ISO recognized standard for file systems • Defines operations and what they should do/return, including nominal and fault behavior File system / POSIX operation Result mkdir (“/eng”, …) mkdir (“/data”, …) creat (“/data/image01”, …) creat (“/eng/fsw/code”, …) mkdir (“/data/telemetry”, …) unlink (“/data/image01”) SUCCESS SUCCESS SUCCESS ENOENT SUCCESS SUCCESS /eng /data image01 /telemetry
  • 27. Differential Testing • How can we tell if a test succeeds? – The POSIX standard specifies (mostly) what correct behavior is – We have heavily tested implementations of the POSIX standard in every flavor of UNIX, readily available to us – We can use UNIX file systems (ext3fs, tmpfs, etc.) as reference systems to verify the correct behavior of flash – First differential approach (published) was McKeeman’s testing for compilers
  • 28. Random Differential Testing Choose (POSIX) operation F Perform F on NVFS Perform F on Reference (if applicable) Compare return values Compare error codes Compare file systems Check invariants (inject a fault?)
  • 29. Don’t Use Random Testing for Everything! • Why not test handing read a null pointer? – Because (assuming the code is correct) it guarantees some portion of test operations will not induce failure – But if the code is incorrect, it’s easier and more efficient to write a single test – The file system state doesn’t have any impact (we hope!) on whether there is a null check for the buffer passed to read • But we have to remember to actually do these non-random fixed tests, or we may miss critical, easy-to-find bugs!
  • 30. Principles Used • • • • Random testing (with feedback) Test automation Hardware simulation & fault injection Use of a well-tested reference implementation as oracle (differential testing) • Automatic test minimization (delta-debugging) • Design for testability – Assertions – Downward scalability (small model property) – Preference for predictability
  • 31. Synopsis • Random testing is sometimes a powerful method and could likely be applied more broadly in other missions – Already applied to four file system-related development efforts – Part or all of this approach is applicable to other critical components (esp. with better models to use as references)
  • 32. Thank You Dr. Himanshu Hora SRMS College of Engineering & Technology Bareilly (INDIA)