SlideShare a Scribd company logo
1 of 32
Test Design Techniques

co-sponsered by
smackstuff.com
In this presentation…..

Black Box Techniques
Equivalence Partioning
Boundary Value Analysis

White Box Techniques
Basis Path Testing
Control Structure Testing
Program Technique Testing
Mutation Testing

co-sponsered by smackstuff.com
Equivalence partitioning

•The input domain is usually too large for exhaustive
testing.
•It is therefore partitioned into a finite number of subdomains for the selection of test inputs.
•Each sub-domain is known as an equivalence class and
serves as a source of at least one test input.

co-sponsered by smackstuff.com
Equivalence partitioning
Input domain

Input domain
partitioned into four
sub-domains.
2

1
Functional testing

3
4
Too many
test inputs.

Four test inputs, one
selected from each sub-domain.

co-sponsered by smackstuff.com
How to partition?
•

Inputs to a program provide clues to partitioning.

•

Example 1:
– Suppose that program P takes an input X, X being an integer.
– For X<0 the program is required to perform task T1 and for X>=0
task T2.

Functional testing
co-sponsered by smackstuff.com
How to partition?-continued
– The input domain is prohibitively large because X can assume a large
number of values.
– However, we expect P to behave the same way for all X<0.
– Similarly, we expect P to perform the same way for all values of
X>=0.
– We therefore partition the input domain of P into two sub-domains .

Functional testing
co-sponsered by smackstuff.com
Two sub-domains

One test case:
X=-3
Equivalence class

Equivalence class

X<0 X>=0

Another test case:
X=-15

Functional testing

All test inputs in the X<0 sub-domain are considered equivalent.
The assumption is that if one test input in this sub-domain reveals
an error in the program, so will the others.
This is true of the test inputs in the X>=0 sub-domain also.
co-sponsered by smackstuff.com
Non-overlapping partitions
•

In the previous example, the two equivalence classes are non-overlapping.
In other words the two sub-domains are disjoint.

•

When the sub-domains are disjoint, it is sufficient to pick one test input
from each equivalence class to test the program .

•

An equivalence class is considered covered when at least one test has
been selected from it.

Functional testing

•

In partition testing our goal is to cover all equivalence classes.

co-sponsered by smackstuff.com
Overlapping partitions
•

Example 2:
– Suppose that program P takes three integers X, Y and Z. It is known
that:
• X<Y
• Z>Y

Functional testing
co-sponsered by smackstuff.com
Overlapping partitions

X<Y, Z<=Y
X=2, Y=3, Z=1

X>=Y, Z<=Y
X=15, Y=4, Z=1

X<Y
X<Y, Z>Y
X=3, Y=4, Z=7

X>=Y

Functional testing

Z>Y

Z<=Y

X>=Y, Z>Y
X=15, Y=4, Z=7
co-sponsered by smackstuff.com
Overlapping partition-test selection
•

In this example, we could select 4 test cases as:
– X=4, Y=7, Z=1
– X=4, Y=2, Z=1

satisfies X>=Y

– X=1, Y=7, Z=9

satisfies Z>Y

– X=1, Y=7, Z=2
•

satisfies X<Y

satisfies Z<=Y

Thus, we have one test case from each equivalence class

Functional testing
co-sponsered by smackstuff.com

.
Overlapping partition-test selection
•

However, we may also select only 2 test inputs and satisfy all four
equivalence classes:
– X=4, Y=7, Z=1
– X=4, Y=2, Z=3

•

satisfies X<Y and Z<=Y
satisfies X>=Y and Z>Y

Thus, we have reduced the number of test cases from 4 to 2 while
covering each equivalence class.

Functional testing
co-sponsered by smackstuff.com
Partitioning using non-numeric data
•
•

In the previous two examples the inputs were integers. One can derive
equivalence classes for other types of data also.
Example 3:
– Suppose that program P takes one character X and one string Y as
inputs. P performs task T1 for all lower case characters and T2 for
upper case characters. Also, it performs task T3 for the null string
and T4 for all other strings.

Functional testing
co-sponsered by smackstuff.com
Partitioning using non-numeric data
X: lc, Y: not null
X: UC, Y: not null
X: lc
X:UC
X: lc, Y: null
Functional testing

Y: null Y: not null

X: UC, Y: null

lc: Lower case character
UC: Upper case character
null: null string.

co-sponsered by smackstuff.com
Non-numeric data
•
•

Once again we have overlapping partitions.
We can select only 2 test inputs to cover all four equivalence classes. These
are:
– X: lower case, Y: null string
– X: upper case, Y: not a null string

Functional testing
co-sponsered by smackstuff.com
Guidelines for equivalence partitioning
•

Input condition specifies a range : create one for the valid case and two for
the invalid cases.
– e.g. for a<=X<=b the classes are
• a<=X<=b (valid case)
• X<a and X>b (the invalid cases)

Functional testing
co-sponsered by smackstuff.com
Guidelines-continued
•

Input condition specifies a value: create one for the valid value and two
for incorrect values (below and above the valid value). This may not be
possible for certain data types, e.g. for Boolean.

•

Input condition specifies a member of a set: create one for the valid

co-sponsered by smackstuff.com

value and one for the invalid (not in the set) value

Design Techniques.

.
Sufficiency of partitions
•
•
•

In the previous examples we derived equivalence classes based on the
conditions satisfied by the input data.
Then we selected just enough tests to cover each partition.
Think of the advantages and disadvantages of this approach !

co-sponsered by smackstuff.com
Design Techniques
Boundary value analysis (BVA)
•
•
•
co-sponsered by smackstuff.com

Another way to generate test cases is to look for boundary values.
Suppose a program takes an integer X as input.
In the absence of any information, we assume that X=0 is a boundary.
Inputs to the program might lie on the boundary or on either side of the
boundary.

Design Techniques
BVA: continued
•

This leads to 3 test inputs:
X=0, X=-20, and X=14.
Note that the values -20 and 14 are on either side of the boundary and are
chosen arbitrarily.

co-sponsered by smackstuff.com

•

Notice that using BVA we get 3 equivalence classes. One of these three
classes contains only one value (X=0), the other two are large

Design Techniques

!
BVA: continued
•

Now suppose that a program takes two integers X and Y and that x1<=X<=x2
and y1<=Y<=y2.

co-sponsered by smackstuff.com

y2

11

8
y1

5

1

2
10
9

12

4
x1

December 20, 2013

14

Design Techniques

13
7
x2

6
3
BVA-continued
•

In this case the four sides of the rectangle represent the boundary.

•

The heuristic for test selection in this case is:
Select one test at each corner (1, 2, 3, 4).

co-sponsered by smackstuff.com

Select one test just outside of each of the four sides of the boundary
(5, 6, 7, 8)

Design Techniques
BVA-continued
• Select one test just inside of each of the four sides of the boundary
(10, 11, 12, 13).
• Select one test case inside of the bounded region (9).
• Select one test case outside of the bounded region (14).
co-sponsered by smackstuff.com

How many equivalence classes do we get?

Design Techniques
BVA -continued
In the previous examples we considered only numeric data.
BVA can be done on any type of data.
For example, suppose that a program takes a string S and an integer X as inputs.
The constraints on inputs are:
co-sponsered by smackstuff.com

length(S)<=100 and a<=X<=b

Can you derive the test cases using BVA?

Design Techniques
BVA applied to output variables
Just as we applied BVA to input data, we can apply it to output data.
Doing so gives us equivalence classes for the output domain.
We then try to find test inputs that will cover each output equivalence class.
co-sponsered by smackstuff.com

Design Techniques
White Box Testing Techniques
It is also called as open box or clear box.
Basis Path Testing

•
co-sponsered by smackstuff.com

•

Control Structure Testing

•

Program Technique Testing

•

Mutation Testing

Design Techniques
Basis Path Testing
•

Checking for the program running or not from all the possible flows

•

Generate flow graph

•

Calculate Cyclomatic complexity

co-sponsered by smackstuff.com

Example
Program

Flow Graph
Cyclomatic complexity

1 + 1 + 1+ 1 = 4

Design Techniques
Basis Path Testing
Using this technique programmers can estimate the execution of the program without
any interruption.

•

Step1: Prepare a program with respect to program logic

•

Step2: Prepare Flow Graph of that program

•
co-sponsered by smackstuff.com

•

Step3: Calculate cyclomatic complexity

•

Step4: Run that program more than one time to cover all the independent paths

Design Techniques
Control Structure Testing
During this testing programmers validate the input and output correctness
Step1: Prepare the program according to the design logic
Step2: Execute the program
co-sponsered by smackstuff.com

Step3: Check the input given to the program in all possible ways
Step4: Check the output of the program

Design Techniques
Program Technique Testing
•

Using this technique programmers are testing the performance of the program with
different inputs

•

Step1: Prepare the program with respective design logic

•

Step2: Execute the program with different inputs

•

Step3: Calculate the process time

co-sponsered by smackstuff.com

•

Step4: If program execution time is not acceptable change the structure of the
program without disturbing the functionality

Design Techniques
Mutation Testing
•

Programmers are making changes in the program to estimate the completeness and
correctness of the program

co-sponsered by smackstuff.com

Program

Program

Program

Change

Change

Passed

Failed

Design Techniques
Smackstuff.com

co-sponsered by
smackstuff.com

More Related Content

What's hot

Fundamental Test Design Techniques
Fundamental Test Design TechniquesFundamental Test Design Techniques
Fundamental Test Design TechniquesTechWell
 
Equivalence partitions analysis
Equivalence partitions analysisEquivalence partitions analysis
Equivalence partitions analysisVadym Muliavka
 
Istqb ctfl-series - Black Box Testing
Istqb ctfl-series - Black Box TestingIstqb ctfl-series - Black Box Testing
Istqb ctfl-series - Black Box TestingDisha Srivastava
 
Equivalence partinioning and boundary value analysis
Equivalence partinioning and boundary value analysisEquivalence partinioning and boundary value analysis
Equivalence partinioning and boundary value analysisniharika5412
 
Testing foundations
Testing foundationsTesting foundations
Testing foundationsNeha Singh
 
EquivalencePartition
EquivalencePartitionEquivalencePartition
EquivalencePartitionswornim nepal
 
Boundary value analysis and equivalence partitioning
Boundary value analysis and equivalence partitioningBoundary value analysis and equivalence partitioning
Boundary value analysis and equivalence partitioningSneha Singh
 
Software Quality Testing
Software Quality TestingSoftware Quality Testing
Software Quality TestingKiran Kumar
 
Software Testing Foundations Part 6 - Intuitive and Experience-based testing
Software Testing Foundations Part 6 - Intuitive and Experience-based testingSoftware Testing Foundations Part 6 - Intuitive and Experience-based testing
Software Testing Foundations Part 6 - Intuitive and Experience-based testingNikita Knysh
 
Whitebox testing
Whitebox testingWhitebox testing
Whitebox testingOana Feidi
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing TechniquesKiran Kumar
 
Test Case Design
Test Case DesignTest Case Design
Test Case Designacatalin
 
Structural testing
Structural testingStructural testing
Structural testingSlideshare
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing TechniquesKiran Kumar
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing FundamentalsKiran Kumar
 
Black Box Test Design Techniques
Black Box Test Design TechniquesBlack Box Test Design Techniques
Black Box Test Design TechniquesGlobalLogic Ukraine
 

What's hot (20)

Fundamental Test Design Techniques
Fundamental Test Design TechniquesFundamental Test Design Techniques
Fundamental Test Design Techniques
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 
Equivalence partitions analysis
Equivalence partitions analysisEquivalence partitions analysis
Equivalence partitions analysis
 
Istqb ctfl-series - Black Box Testing
Istqb ctfl-series - Black Box TestingIstqb ctfl-series - Black Box Testing
Istqb ctfl-series - Black Box Testing
 
Equivalence partinioning and boundary value analysis
Equivalence partinioning and boundary value analysisEquivalence partinioning and boundary value analysis
Equivalence partinioning and boundary value analysis
 
Testing foundations
Testing foundationsTesting foundations
Testing foundations
 
EquivalencePartition
EquivalencePartitionEquivalencePartition
EquivalencePartition
 
Boundary value analysis and equivalence partitioning
Boundary value analysis and equivalence partitioningBoundary value analysis and equivalence partitioning
Boundary value analysis and equivalence partitioning
 
Software Quality Testing
Software Quality TestingSoftware Quality Testing
Software Quality Testing
 
Software Testing Foundations Part 6 - Intuitive and Experience-based testing
Software Testing Foundations Part 6 - Intuitive and Experience-based testingSoftware Testing Foundations Part 6 - Intuitive and Experience-based testing
Software Testing Foundations Part 6 - Intuitive and Experience-based testing
 
Whitebox testing
Whitebox testingWhitebox testing
Whitebox testing
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing Techniques
 
Test Case Design
Test Case DesignTest Case Design
Test Case Design
 
Structural testing
Structural testingStructural testing
Structural testing
 
Whitebox
WhiteboxWhitebox
Whitebox
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing Techniques
 
White box testing
White box testingWhite box testing
White box testing
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing Fundamentals
 
Structure testing
Structure testingStructure testing
Structure testing
 
Black Box Test Design Techniques
Black Box Test Design TechniquesBlack Box Test Design Techniques
Black Box Test Design Techniques
 

Viewers also liked

Viewers also liked (7)

Decision table
Decision tableDecision table
Decision table
 
Software test management overview for managers
Software test management overview for managersSoftware test management overview for managers
Software test management overview for managers
 
ISTQB foundation level - day 2
ISTQB foundation level - day 2ISTQB foundation level - day 2
ISTQB foundation level - day 2
 
Writing Test Cases 20110808
Writing Test Cases 20110808Writing Test Cases 20110808
Writing Test Cases 20110808
 
Chapter 8 software testing
Chapter 8 software testingChapter 8 software testing
Chapter 8 software testing
 
Istqb foundation level day 1
Istqb foundation level   day 1Istqb foundation level   day 1
Istqb foundation level day 1
 
E-R DIAGRAMS, DFD'S AND STATE TRANSITION DIAGRAMS !!
E-R DIAGRAMS, DFD'S AND STATE TRANSITION DIAGRAMS !!E-R DIAGRAMS, DFD'S AND STATE TRANSITION DIAGRAMS !!
E-R DIAGRAMS, DFD'S AND STATE TRANSITION DIAGRAMS !!
 

Similar to Test design techniques

Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic TestingJimi Patel
 
Black Box Testing.pdf
Black Box Testing.pdfBlack Box Testing.pdf
Black Box Testing.pdfSupunLakshan4
 
5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.ppt5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.pptSyedAhmad732853
 
CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4SIMONTHOMAS S
 
Test Coverage: An Art and a Science
Test Coverage: An Art and a ScienceTest Coverage: An Art and a Science
Test Coverage: An Art and a ScienceTeamQualityPro
 
Software Testing Introduction (Part 2)
Software Testing Introduction (Part 2)Software Testing Introduction (Part 2)
Software Testing Introduction (Part 2)Thapar Institute
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhPankaj Thakur
 
Software Engineering : Software testing
Software Engineering : Software testingSoftware Engineering : Software testing
Software Engineering : Software testingAjit Nayak
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and TechniqueSachin-QA
 
Test Case Design
Test Case DesignTest Case Design
Test Case DesignVidya-QA
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and TechniqueFayis-QA
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and TechniqueANKUR-BA
 
Test Case Design & Technique
Test Case Design & TechniqueTest Case Design & Technique
Test Case Design & TechniqueRajesh-QA
 

Similar to Test design techniques (20)

AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
 
AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
 
AutoTest.ppt
AutoTest.pptAutoTest.ppt
AutoTest.ppt
 
Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic Testing
 
11 whiteboxtesting
11 whiteboxtesting11 whiteboxtesting
11 whiteboxtesting
 
Black Box Testing.pdf
Black Box Testing.pdfBlack Box Testing.pdf
Black Box Testing.pdf
 
Testing part 2 bb
Testing part 2 bbTesting part 2 bb
Testing part 2 bb
 
5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.ppt5.Black Box Testing and Levels of Testing.ppt
5.Black Box Testing and Levels of Testing.ppt
 
CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4
 
Test Coverage: An Art and a Science
Test Coverage: An Art and a ScienceTest Coverage: An Art and a Science
Test Coverage: An Art and a Science
 
Software Testing Introduction (Part 2)
Software Testing Introduction (Part 2)Software Testing Introduction (Part 2)
Software Testing Introduction (Part 2)
 
White Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR ChandigarhWhite Box testing by Pankaj Thakur, NITTTR Chandigarh
White Box testing by Pankaj Thakur, NITTTR Chandigarh
 
st_unit_2.ppt
st_unit_2.pptst_unit_2.ppt
st_unit_2.ppt
 
Software Engineering : Software testing
Software Engineering : Software testingSoftware Engineering : Software testing
Software Engineering : Software testing
 
Testing
TestingTesting
Testing
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
 
Test Case Design
Test Case DesignTest Case Design
Test Case Design
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
 
Test Case Design & Technique
Test Case Design & TechniqueTest Case Design & Technique
Test Case Design & Technique
 

Recently uploaded

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Zilliz
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 

Recently uploaded (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 

Test design techniques

  • 2. In this presentation….. Black Box Techniques Equivalence Partioning Boundary Value Analysis White Box Techniques Basis Path Testing Control Structure Testing Program Technique Testing Mutation Testing co-sponsered by smackstuff.com
  • 3. Equivalence partitioning •The input domain is usually too large for exhaustive testing. •It is therefore partitioned into a finite number of subdomains for the selection of test inputs. •Each sub-domain is known as an equivalence class and serves as a source of at least one test input. co-sponsered by smackstuff.com
  • 4. Equivalence partitioning Input domain Input domain partitioned into four sub-domains. 2 1 Functional testing 3 4 Too many test inputs. Four test inputs, one selected from each sub-domain. co-sponsered by smackstuff.com
  • 5. How to partition? • Inputs to a program provide clues to partitioning. • Example 1: – Suppose that program P takes an input X, X being an integer. – For X<0 the program is required to perform task T1 and for X>=0 task T2. Functional testing co-sponsered by smackstuff.com
  • 6. How to partition?-continued – The input domain is prohibitively large because X can assume a large number of values. – However, we expect P to behave the same way for all X<0. – Similarly, we expect P to perform the same way for all values of X>=0. – We therefore partition the input domain of P into two sub-domains . Functional testing co-sponsered by smackstuff.com
  • 7. Two sub-domains One test case: X=-3 Equivalence class Equivalence class X<0 X>=0 Another test case: X=-15 Functional testing All test inputs in the X<0 sub-domain are considered equivalent. The assumption is that if one test input in this sub-domain reveals an error in the program, so will the others. This is true of the test inputs in the X>=0 sub-domain also. co-sponsered by smackstuff.com
  • 8. Non-overlapping partitions • In the previous example, the two equivalence classes are non-overlapping. In other words the two sub-domains are disjoint. • When the sub-domains are disjoint, it is sufficient to pick one test input from each equivalence class to test the program . • An equivalence class is considered covered when at least one test has been selected from it. Functional testing • In partition testing our goal is to cover all equivalence classes. co-sponsered by smackstuff.com
  • 9. Overlapping partitions • Example 2: – Suppose that program P takes three integers X, Y and Z. It is known that: • X<Y • Z>Y Functional testing co-sponsered by smackstuff.com
  • 10. Overlapping partitions X<Y, Z<=Y X=2, Y=3, Z=1 X>=Y, Z<=Y X=15, Y=4, Z=1 X<Y X<Y, Z>Y X=3, Y=4, Z=7 X>=Y Functional testing Z>Y Z<=Y X>=Y, Z>Y X=15, Y=4, Z=7 co-sponsered by smackstuff.com
  • 11. Overlapping partition-test selection • In this example, we could select 4 test cases as: – X=4, Y=7, Z=1 – X=4, Y=2, Z=1 satisfies X>=Y – X=1, Y=7, Z=9 satisfies Z>Y – X=1, Y=7, Z=2 • satisfies X<Y satisfies Z<=Y Thus, we have one test case from each equivalence class Functional testing co-sponsered by smackstuff.com .
  • 12. Overlapping partition-test selection • However, we may also select only 2 test inputs and satisfy all four equivalence classes: – X=4, Y=7, Z=1 – X=4, Y=2, Z=3 • satisfies X<Y and Z<=Y satisfies X>=Y and Z>Y Thus, we have reduced the number of test cases from 4 to 2 while covering each equivalence class. Functional testing co-sponsered by smackstuff.com
  • 13. Partitioning using non-numeric data • • In the previous two examples the inputs were integers. One can derive equivalence classes for other types of data also. Example 3: – Suppose that program P takes one character X and one string Y as inputs. P performs task T1 for all lower case characters and T2 for upper case characters. Also, it performs task T3 for the null string and T4 for all other strings. Functional testing co-sponsered by smackstuff.com
  • 14. Partitioning using non-numeric data X: lc, Y: not null X: UC, Y: not null X: lc X:UC X: lc, Y: null Functional testing Y: null Y: not null X: UC, Y: null lc: Lower case character UC: Upper case character null: null string. co-sponsered by smackstuff.com
  • 15. Non-numeric data • • Once again we have overlapping partitions. We can select only 2 test inputs to cover all four equivalence classes. These are: – X: lower case, Y: null string – X: upper case, Y: not a null string Functional testing co-sponsered by smackstuff.com
  • 16. Guidelines for equivalence partitioning • Input condition specifies a range : create one for the valid case and two for the invalid cases. – e.g. for a<=X<=b the classes are • a<=X<=b (valid case) • X<a and X>b (the invalid cases) Functional testing co-sponsered by smackstuff.com
  • 17. Guidelines-continued • Input condition specifies a value: create one for the valid value and two for incorrect values (below and above the valid value). This may not be possible for certain data types, e.g. for Boolean. • Input condition specifies a member of a set: create one for the valid co-sponsered by smackstuff.com value and one for the invalid (not in the set) value Design Techniques. .
  • 18. Sufficiency of partitions • • • In the previous examples we derived equivalence classes based on the conditions satisfied by the input data. Then we selected just enough tests to cover each partition. Think of the advantages and disadvantages of this approach ! co-sponsered by smackstuff.com Design Techniques
  • 19. Boundary value analysis (BVA) • • • co-sponsered by smackstuff.com Another way to generate test cases is to look for boundary values. Suppose a program takes an integer X as input. In the absence of any information, we assume that X=0 is a boundary. Inputs to the program might lie on the boundary or on either side of the boundary. Design Techniques
  • 20. BVA: continued • This leads to 3 test inputs: X=0, X=-20, and X=14. Note that the values -20 and 14 are on either side of the boundary and are chosen arbitrarily. co-sponsered by smackstuff.com • Notice that using BVA we get 3 equivalence classes. One of these three classes contains only one value (X=0), the other two are large Design Techniques !
  • 21. BVA: continued • Now suppose that a program takes two integers X and Y and that x1<=X<=x2 and y1<=Y<=y2. co-sponsered by smackstuff.com y2 11 8 y1 5 1 2 10 9 12 4 x1 December 20, 2013 14 Design Techniques 13 7 x2 6 3
  • 22. BVA-continued • In this case the four sides of the rectangle represent the boundary. • The heuristic for test selection in this case is: Select one test at each corner (1, 2, 3, 4). co-sponsered by smackstuff.com Select one test just outside of each of the four sides of the boundary (5, 6, 7, 8) Design Techniques
  • 23. BVA-continued • Select one test just inside of each of the four sides of the boundary (10, 11, 12, 13). • Select one test case inside of the bounded region (9). • Select one test case outside of the bounded region (14). co-sponsered by smackstuff.com How many equivalence classes do we get? Design Techniques
  • 24. BVA -continued In the previous examples we considered only numeric data. BVA can be done on any type of data. For example, suppose that a program takes a string S and an integer X as inputs. The constraints on inputs are: co-sponsered by smackstuff.com length(S)<=100 and a<=X<=b Can you derive the test cases using BVA? Design Techniques
  • 25. BVA applied to output variables Just as we applied BVA to input data, we can apply it to output data. Doing so gives us equivalence classes for the output domain. We then try to find test inputs that will cover each output equivalence class. co-sponsered by smackstuff.com Design Techniques
  • 26. White Box Testing Techniques It is also called as open box or clear box. Basis Path Testing • co-sponsered by smackstuff.com • Control Structure Testing • Program Technique Testing • Mutation Testing Design Techniques
  • 27. Basis Path Testing • Checking for the program running or not from all the possible flows • Generate flow graph • Calculate Cyclomatic complexity co-sponsered by smackstuff.com Example Program Flow Graph Cyclomatic complexity 1 + 1 + 1+ 1 = 4 Design Techniques
  • 28. Basis Path Testing Using this technique programmers can estimate the execution of the program without any interruption. • Step1: Prepare a program with respect to program logic • Step2: Prepare Flow Graph of that program • co-sponsered by smackstuff.com • Step3: Calculate cyclomatic complexity • Step4: Run that program more than one time to cover all the independent paths Design Techniques
  • 29. Control Structure Testing During this testing programmers validate the input and output correctness Step1: Prepare the program according to the design logic Step2: Execute the program co-sponsered by smackstuff.com Step3: Check the input given to the program in all possible ways Step4: Check the output of the program Design Techniques
  • 30. Program Technique Testing • Using this technique programmers are testing the performance of the program with different inputs • Step1: Prepare the program with respective design logic • Step2: Execute the program with different inputs • Step3: Calculate the process time co-sponsered by smackstuff.com • Step4: If program execution time is not acceptable change the structure of the program without disturbing the functionality Design Techniques
  • 31. Mutation Testing • Programmers are making changes in the program to estimate the completeness and correctness of the program co-sponsered by smackstuff.com Program Program Program Change Change Passed Failed Design Techniques