SlideShare ist ein Scribd-Unternehmen logo
1 von 22
Downloaden Sie, um offline zu lesen
Agenda
• Need of Test Case Design Techniques
• Test Case Design Techniques classification
• Black box Test Case Design Techniques
• Equivalence Partitioning
• Boundary Value Analysis
• Decision Table
• Error Guessing
• Need of Test Case Design Techniques
Ex: : Impossibility of testing "everything”
int calc (int j)
{
j = j -1; // should be j = j + 1
j = j / 30000;
return j;
}
1. Note that the second line is incorrect!
2. The function calc accepts an integer j, subtracts one from it, divides
it by 30000 (integer division, whole numbers, no remainder) and
returns the value just computed.
3. . If integers are implemented using 16 bits on this computer
executing this software, the lowest possible input value is -32768
and the highest is 32767. Thus there are 65,536 possible inputs into
this tiny program
Continued..
Will you have the time (and the stamina) to create 65,536 test cases?
Of course not. So which input values do we choose? Consider the following input values
and their ability to detect this defect.
Input (j) Expected Result Actual Result
1 0 0
42 0 0
40000 1 1
-64000 -2 -2
Continued..
o Oops! Note that none of the test cases chosen have detected this defect
o In fact only four of the possible 65,536 input values will find this defect.
What is the chance that you will choose all four?
o What is the chance you will choose one of the four?
o What is the chance you will win the lottery?
What is Black box Testing?
Black box testing is a strategy in which testing is based solely on the requirements and
specifications. Unlike its complement, white box testing, black box testing requires no
knowledge of the internal paths, structure, or implementation of the software under test
(SUT).
The general black box testing process is:
The requirements or specifications are analyzed.
Valid inputs are chosen based on the specification to determine that the SUT processes
them correctly. Invalid inputs must also be chosen to verify that the SUT detects them
and handles them properly.
Expected outputs for those inputs are determined.
Tests are constructed with the selected inputs.
The tests are run.
Actual outputs are compared with the expected outputs.
A determination is made as to the proper functioning of the SUT
Test Case design Techniques
classification
Section I - Black Box Testing Techniques
• Equivalence Class Testing
• Boundary Value Analysis
• Decision Table Testing
• Pair wise Testing
• State-Transition Testing
• Domain Analysis Testing
• Use Case Testing
Section11- White Box Testing Techniques
• Control Flow Testing
• Data Flow Testing
• Testing Paradigms
Section 111: Experience based Technique
• Error Guessing
• Exploratory Testing
Boundary Value Testing
Introduction:
Equivalence class testing is the most basic test design technique.
1.It helps testers choose a small subset of possible test cases while maintaining
reasonable coverage.
2. Equivalence class testing has a second benefit. It leads us to the idea of boundary
value testing, the second key test design technique to be presented.
Continued..
1In the previous example the following rules were given that indicate how we should
process employment applications based on a person's age.
The rules were:
0–16
Don't hire
16–18
Can hire on a part-time basis only
18–55
Can hire as a full-time employee
55–99
Don't hire
Notice the problem at the boundaries—the "edges" of each class. The age "16" is
included in two different equivalence classes (as are 18 and 55). The first rule says don't
hire a 16-year-old. The second rule says a 16-year-old can be hired on a part-time basis
Continued..
Key Point : Boundary value testing focuses on the boundaries because that is
where so many defects hide.
If (applicantAge >= 0 && applicantAge <=16) hireStatus="NO"; If (applicantAge >= 16
&& applicantAge <=18) hireStatus="PART"; If (applicantAge >= 18 && applicantAge
<=55) hireStatus="FULL"; If (applicantAge >= 55 && applicantAge <=99)
hireStatus="NO";
`
Of course, the mistake that programmers make is coding inequality tests improperly.
Writing > (greater than) instead of ≥ (greater than or equal) is an example.
The interesting values on or near the boundaries in this example are {-1, 0, 1}, {15, 16,
17}, {17, 18, 19}, {54, 55, 56}, and {98, 99, 100}.
Technique
The steps for using boundary value testing are simple.
Step 1: identify the equivalence classes.
Step 2: identify the boundaries of each equivalence class.
Step 3: create test cases for each boundary value by choosing one point on the
boundary, one point just below the boundary, and one point just above the
boundary. "Below" and "above" are relative terms and depend on the data value's
units.
Ex 1: If the boundary is 16 and the unit is "integer" then the "below" point is 15
and the "above" point is 17.
Ex 2: If the boundary is $5.00 and the unit is "US dollars and cents" then the
below point is $4.99 and the above point is $5.01. On the other hand, if the value
is $5 and the unit is "US dollars" then the below point is $4 and the above point is
$6.
Key Point Create test cases for each boundary value by choosing one point
on the boundary, one point just below the boundary, and one point just
above the boundary.
Summary
•While equivalence class testing is useful, its greatest contribution is to lead us to
boundary value testing.
•Boundary value testing is a technique used to reduce the number of test cases to a
manageable size while still maintaining reasonable coverage.
•Boundary value testing focuses on the boundaries because that is where so many
defects hide. Experienced testers have encountered this situation many times.
•Create test cases for each boundary value by choosing one point on the boundary, one
point just below the boundary, and one point just above the boundary. "Below" and
"above" are relative terms and depend on the data value's units.
Practice
•ZIP Code—five numeric digits.
•First consider ZIP Code just in terms of digits. Then, determine the lowest and
highest legitimate ZIP Codes in the United States. For extra credit [1]
,
determine the format of postal codes for Canada and the lowest and highest
valid values.
•Last Name—one through fifteen characters (including alphabetic characters,
periods, hyphens, apostrophes, spaces, and numbers). For extra credit [2]
create a few very complex Last Names. Can you determine the "rules" for
legitimate Last Names? For additional extra credit [3]
use a phonebook from
another country—try Finland or Thailand.
•User ID—eight characters at least two of which are not alphabetic (numeric,
special, nonprinting).
Decision Table Testing
Decision tables are an excellent tool to capture certain kinds of system
requirements and to document internal system design
They are used to record complex business rules that a system must
implement.
In addition, they can serve as a guide to creating test cases.
Technique
The general form of a decision table
    Rule 1 Rule 2 Rule 3 Rule 4 Rule N
Conditions            
Condition-1            
Condition-2            
Condition-3            
Condition-4            
Condition-N            
             
Actions            
Technique
•Conditions represent various input conditions.
•Actions are the actions that should be taken depending
on the various combinations of input conditions.
• Each of the rules defines a unique combination of
conditions that result in the execution ("firing") of the
actions associated with that rule.
Ex:
•An auto insurance company gives discounts to drivers
who are married and/or good students. Let's begin with
the conditions. The following decision table has two
conditions, each one of which takes on the values Yes
or No.
A decision table with two binary
conditions
 `   Rule 1 Rule 2 Rule 3 Rule 4
Conditions          
Married?    Yes Yes  No No
Good Student?    Yes No Yes No
A decision table with two binary
conditions and Actions
Note that the table contains all combinations of the conditions. Given two binary conditions
(Yes or No), the possible combinations are {Yes, Yes}, {Yes, No}, {No, Yes}, and {No, No}.
Each rule represents one of these combinations.
As a tester we will verify that all combinations of the conditions are defined. Missing
a combination may result in developing a system that may not process a particular
set of inputs properly.
 `   Rule 1 Rule 2 Rule 3 Rule 4
Conditions          
Married?    Yes Yes  No No
Good Student?    Yes No Yes No
Action
Discount ($) 40 25 20 0
Technique
A decision table with non-binary conditions.
 `   Rule 1 Rule 2 Rule 3 Rule 4
Conditions          
Condition 1    0-1 1-10 10-100
10-
1000
Condition 2    <5 5 6 or 7 >7
Action
Action 1 Do X Do A Do Z Do C
Action 2 Do Y Do X Do B Do A
Key Point Create at least one test case for each rule.
If the system under test has complex business rules, and if your
business analysts or designers have not documented these rules in
this form, testers should gather this information and represent it in
decision table form.
The reason is simple. Given the system behavior represented in this
complete and compact form, test cases can be created directly from
the decision table.
In testing, create at least one test case for each rule. If the rule's
conditions are binary, a single test for each combination is probably
sufficient. On the other hand, if a condition is a range of values,
consider testing at both the low and high end of the range. In this way
we merge the ideas of Boundary Value testing with Decision Table
testing.
Key Point Create at least one test case for each rule.
.  A decision table converted to a test case table. 
  Test Case
1 
Test Case
2 
Test Case
3 
Test Case
4 
Inputs         
•Condition
-1
Yes Yes No No
•Condition
-2
Yes No Yes No
         
Expected 
Results 
       
•Action-1 Do X Do Y Do X Do Z
•Action-2 Do A Do B Do B Do B
To create a test case table simply change the row and
column headings
Applicability and Limitations
Decision tables are used to document complex business rules that a system
must implement. In addition, they serve as a guide to creating test cases.
Conditions represent various input conditions.
Actions are the processes that should be executed depending on the various
combinations of input conditions. Each rule defines a unique combination of
conditions that result in the execution ("firing") of the actions associated with
that rule.
Create at least one test case for each rule. If the rule's conditions are binary, a
single test for each combination is probably sufficient. On the other hand, if a
condition is a range of values, consider testing at both the low and high end of
the range.

Weitere ähnliche Inhalte

Was ist angesagt?

Chapter 5 - Automating the Test Execution
Chapter 5 - Automating the Test ExecutionChapter 5 - Automating the Test Execution
Chapter 5 - Automating the Test ExecutionNeeraj Kumar Singh
 
JIRA Introduction | JIRA Tutorial | Atlassian JIRA Training | H2kinfosys
JIRA Introduction | JIRA Tutorial | Atlassian JIRA Training | H2kinfosysJIRA Introduction | JIRA Tutorial | Atlassian JIRA Training | H2kinfosys
JIRA Introduction | JIRA Tutorial | Atlassian JIRA Training | H2kinfosysH2Kinfosys
 
Boundary Value Analysis and Equivalence class Partitioning Testing.pptx
Boundary Value Analysis and Equivalence class Partitioning Testing.pptxBoundary Value Analysis and Equivalence class Partitioning Testing.pptx
Boundary Value Analysis and Equivalence class Partitioning Testing.pptxlandesc
 
Ctfl at sample exam a v1.2 answers
Ctfl at sample exam a v1.2 answersCtfl at sample exam a v1.2 answers
Ctfl at sample exam a v1.2 answersNeeraj Kumar Singh
 
Writing Test Cases in Agile
Writing Test Cases in AgileWriting Test Cases in Agile
Writing Test Cases in AgileSaroj Singh
 
Software Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
Software Testing Life Cycle (STLC) | Software Testing Tutorial | EdurekaSoftware Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
Software Testing Life Cycle (STLC) | Software Testing Tutorial | EdurekaEdureka!
 
Principles of Software testing
Principles of Software testingPrinciples of Software testing
Principles of Software testingMd Mamunur Rashid
 
ISTQB Foundation Level Basic
ISTQB Foundation Level BasicISTQB Foundation Level Basic
ISTQB Foundation Level BasicErol Selitektay
 
Agile presentation
Agile presentationAgile presentation
Agile presentationinfolock
 
Software Testing Life Cycle
Software Testing Life CycleSoftware Testing Life Cycle
Software Testing Life CycleUdayakumar Sree
 

Was ist angesagt? (20)

Chapter 5 - Automating the Test Execution
Chapter 5 - Automating the Test ExecutionChapter 5 - Automating the Test Execution
Chapter 5 - Automating the Test Execution
 
SCRUM Core Concepts
SCRUM Core ConceptsSCRUM Core Concepts
SCRUM Core Concepts
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 
Testing in Agile Development
Testing in Agile DevelopmentTesting in Agile Development
Testing in Agile Development
 
Test Automation
Test AutomationTest Automation
Test Automation
 
Chapter 5 - Reviews
Chapter 5 - ReviewsChapter 5 - Reviews
Chapter 5 - Reviews
 
Scrum best practices
Scrum best practicesScrum best practices
Scrum best practices
 
JIRA Introduction | JIRA Tutorial | Atlassian JIRA Training | H2kinfosys
JIRA Introduction | JIRA Tutorial | Atlassian JIRA Training | H2kinfosysJIRA Introduction | JIRA Tutorial | Atlassian JIRA Training | H2kinfosys
JIRA Introduction | JIRA Tutorial | Atlassian JIRA Training | H2kinfosys
 
Boundary Value Analysis and Equivalence class Partitioning Testing.pptx
Boundary Value Analysis and Equivalence class Partitioning Testing.pptxBoundary Value Analysis and Equivalence class Partitioning Testing.pptx
Boundary Value Analysis and Equivalence class Partitioning Testing.pptx
 
Ctfl at sample exam a v1.2 answers
Ctfl at sample exam a v1.2 answersCtfl at sample exam a v1.2 answers
Ctfl at sample exam a v1.2 answers
 
Writing Test Cases in Agile
Writing Test Cases in AgileWriting Test Cases in Agile
Writing Test Cases in Agile
 
Chapter 1 - Agile Methodology
Chapter 1 - Agile MethodologyChapter 1 - Agile Methodology
Chapter 1 - Agile Methodology
 
Chapter 5 - Test Management
Chapter 5 - Test ManagementChapter 5 - Test Management
Chapter 5 - Test Management
 
Software Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
Software Testing Life Cycle (STLC) | Software Testing Tutorial | EdurekaSoftware Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
Software Testing Life Cycle (STLC) | Software Testing Tutorial | Edureka
 
Principles of Software testing
Principles of Software testingPrinciples of Software testing
Principles of Software testing
 
Presentation ADM - SCRUMBAN
Presentation ADM - SCRUMBANPresentation ADM - SCRUMBAN
Presentation ADM - SCRUMBAN
 
ISTQB Foundation Level Basic
ISTQB Foundation Level BasicISTQB Foundation Level Basic
ISTQB Foundation Level Basic
 
Agile presentation
Agile presentationAgile presentation
Agile presentation
 
Software Testing Life Cycle
Software Testing Life CycleSoftware Testing Life Cycle
Software Testing Life Cycle
 
Agile Scrum Framework vs Kanban Method
Agile Scrum Framework  vs Kanban MethodAgile Scrum Framework  vs Kanban Method
Agile Scrum Framework vs Kanban Method
 

Andere mochten auch

Fact table design for data ware house
Fact table design for data ware houseFact table design for data ware house
Fact table design for data ware houseSayed Ahmed
 
Informatica interview questions and answers|Informatica Faqs 2014
Informatica interview questions and answers|Informatica Faqs 2014Informatica interview questions and answers|Informatica Faqs 2014
Informatica interview questions and answers|Informatica Faqs 2014BigClasses.com
 
Random testing
Random testingRandom testing
Random testingCan KAYA
 
Insurance domain mishra
Insurance domain  mishraInsurance domain  mishra
Insurance domain mishraAjay Mishra
 
Cts informatica interview question answers
Cts informatica interview question answersCts informatica interview question answers
Cts informatica interview question answersSweta Singh
 
Test design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniquesTest design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniquesKhuong Nguyen
 
ETL Testing Interview Questions and Answers
ETL Testing Interview Questions and AnswersETL Testing Interview Questions and Answers
ETL Testing Interview Questions and AnswersH2Kinfosys
 
Test Case Design
Test Case DesignTest Case Design
Test Case Designacatalin
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing TechniquesKiran Kumar
 
Software testing life cycle
Software testing life cycleSoftware testing life cycle
Software testing life cycleGaruda Trainings
 

Andere mochten auch (15)

Fact table design for data ware house
Fact table design for data ware houseFact table design for data ware house
Fact table design for data ware house
 
Informatica interview questions and answers|Informatica Faqs 2014
Informatica interview questions and answers|Informatica Faqs 2014Informatica interview questions and answers|Informatica Faqs 2014
Informatica interview questions and answers|Informatica Faqs 2014
 
Random testing
Random testingRandom testing
Random testing
 
Insurance domain mishra
Insurance domain  mishraInsurance domain  mishra
Insurance domain mishra
 
Test cases
Test casesTest cases
Test cases
 
Cts informatica interview question answers
Cts informatica interview question answersCts informatica interview question answers
Cts informatica interview question answers
 
ETL QA
ETL QAETL QA
ETL QA
 
SQL for ETL Testing
SQL for ETL TestingSQL for ETL Testing
SQL for ETL Testing
 
Test design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniquesTest design techniques: Structured and Experienced-based techniques
Test design techniques: Structured and Experienced-based techniques
 
ETL Testing Interview Questions and Answers
ETL Testing Interview Questions and AnswersETL Testing Interview Questions and Answers
ETL Testing Interview Questions and Answers
 
Test Case Design
Test Case DesignTest Case Design
Test Case Design
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing Techniques
 
Testing techniques
Testing techniquesTesting techniques
Testing techniques
 
Black box & white-box testing technique
Black box & white-box testing techniqueBlack box & white-box testing technique
Black box & white-box testing technique
 
Software testing life cycle
Software testing life cycleSoftware testing life cycle
Software testing life cycle
 

Ähnlich wie Testcase design techniques final

Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic TestingJimi Patel
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing FundamentalsKiran Kumar
 
Shift-Left Testing: QA in a DevOps World by David Laulusa
Shift-Left Testing: QA in a DevOps World by David LaulusaShift-Left Testing: QA in a DevOps World by David Laulusa
Shift-Left Testing: QA in a DevOps World by David LaulusaQA or the Highway
 
Software Testing - Test Design Techniques
Software Testing - Test Design TechniquesSoftware Testing - Test Design Techniques
Software Testing - Test Design TechniquesRegina Vitalicio
 
Black box testing techniques
Black box testing techniques Black box testing techniques
Black box testing techniques Nguyen Quoc Dung
 
Software Testing Introduction (Part 2)
Software Testing Introduction (Part 2)Software Testing Introduction (Part 2)
Software Testing Introduction (Part 2)Thapar Institute
 
ISTQB, ISEB Lecture Notes- 4
ISTQB, ISEB Lecture Notes- 4ISTQB, ISEB Lecture Notes- 4
ISTQB, ISEB Lecture Notes- 4onsoftwaretest
 
Testing foundations
Testing foundationsTesting foundations
Testing foundationsNeha Singh
 
CIS 1403 lab 4 selection
CIS 1403 lab 4 selectionCIS 1403 lab 4 selection
CIS 1403 lab 4 selectionHamad Odhabi
 
Implementing Blackbox Testing
Implementing Blackbox TestingImplementing Blackbox Testing
Implementing Blackbox TestingEdureka!
 
selection.ppt
selection.pptselection.ppt
selection.pptalaguap
 
ch1. .ppt
ch1. .pptch1. .ppt
ch1. .pptmazber1
 
Black Box Testing.pdf
Black Box Testing.pdfBlack Box Testing.pdf
Black Box Testing.pdfSupunLakshan4
 
Test Case Design
Test Case DesignTest Case Design
Test Case DesignVidya-QA
 

Ähnlich wie Testcase design techniques final (20)

Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic Testing
 
Testing
TestingTesting
Testing
 
Lec 17.pptx
Lec 17.pptxLec 17.pptx
Lec 17.pptx
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing Fundamentals
 
CTFL Module 04
CTFL Module 04CTFL Module 04
CTFL Module 04
 
SE%200-Testing%20(2).pptx
SE%200-Testing%20(2).pptxSE%200-Testing%20(2).pptx
SE%200-Testing%20(2).pptx
 
Shift-Left Testing: QA in a DevOps World by David Laulusa
Shift-Left Testing: QA in a DevOps World by David LaulusaShift-Left Testing: QA in a DevOps World by David Laulusa
Shift-Left Testing: QA in a DevOps World by David Laulusa
 
Software Testing - Test Design Techniques
Software Testing - Test Design TechniquesSoftware Testing - Test Design Techniques
Software Testing - Test Design Techniques
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 
Lesson 2....PPT 1
Lesson 2....PPT 1Lesson 2....PPT 1
Lesson 2....PPT 1
 
Black box testing techniques
Black box testing techniques Black box testing techniques
Black box testing techniques
 
Software Testing Introduction (Part 2)
Software Testing Introduction (Part 2)Software Testing Introduction (Part 2)
Software Testing Introduction (Part 2)
 
ISTQB, ISEB Lecture Notes- 4
ISTQB, ISEB Lecture Notes- 4ISTQB, ISEB Lecture Notes- 4
ISTQB, ISEB Lecture Notes- 4
 
Testing foundations
Testing foundationsTesting foundations
Testing foundations
 
CIS 1403 lab 4 selection
CIS 1403 lab 4 selectionCIS 1403 lab 4 selection
CIS 1403 lab 4 selection
 
Implementing Blackbox Testing
Implementing Blackbox TestingImplementing Blackbox Testing
Implementing Blackbox Testing
 
selection.ppt
selection.pptselection.ppt
selection.ppt
 
ch1. .ppt
ch1. .pptch1. .ppt
ch1. .ppt
 
Black Box Testing.pdf
Black Box Testing.pdfBlack Box Testing.pdf
Black Box Testing.pdf
 
Test Case Design
Test Case DesignTest Case Design
Test Case Design
 

Kürzlich hochgeladen

Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxAna-Maria Mihalceanu
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...amber724300
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Kaya Weers
 
QMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfQMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfROWELL MARQUINA
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Jeffrey Haguewood
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialJoão Esperancinha
 

Kürzlich hochgeladen (20)

Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
How Tech Giants Cut Corners to Harvest Data for A.I.
How Tech Giants Cut Corners to Harvest Data for A.I.How Tech Giants Cut Corners to Harvest Data for A.I.
How Tech Giants Cut Corners to Harvest Data for A.I.
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
A Glance At The Java Performance Toolbox
A Glance At The Java Performance ToolboxA Glance At The Java Performance Toolbox
A Glance At The Java Performance Toolbox
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
JET Technology Labs White Paper for Virtualized Security and Encryption Techn...
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)Design pattern talk by Kaya Weers - 2024 (v2)
Design pattern talk by Kaya Weers - 2024 (v2)
 
QMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfQMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdf
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
Email Marketing Automation for Bonterra Impact Management (fka Social Solutio...
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
 

Testcase design techniques final

  • 1.
  • 2. Agenda • Need of Test Case Design Techniques • Test Case Design Techniques classification • Black box Test Case Design Techniques • Equivalence Partitioning • Boundary Value Analysis • Decision Table • Error Guessing
  • 3. • Need of Test Case Design Techniques Ex: : Impossibility of testing "everything” int calc (int j) { j = j -1; // should be j = j + 1 j = j / 30000; return j; } 1. Note that the second line is incorrect! 2. The function calc accepts an integer j, subtracts one from it, divides it by 30000 (integer division, whole numbers, no remainder) and returns the value just computed. 3. . If integers are implemented using 16 bits on this computer executing this software, the lowest possible input value is -32768 and the highest is 32767. Thus there are 65,536 possible inputs into this tiny program
  • 4. Continued.. Will you have the time (and the stamina) to create 65,536 test cases? Of course not. So which input values do we choose? Consider the following input values and their ability to detect this defect. Input (j) Expected Result Actual Result 1 0 0 42 0 0 40000 1 1 -64000 -2 -2
  • 5. Continued.. o Oops! Note that none of the test cases chosen have detected this defect o In fact only four of the possible 65,536 input values will find this defect. What is the chance that you will choose all four? o What is the chance you will choose one of the four? o What is the chance you will win the lottery?
  • 6. What is Black box Testing? Black box testing is a strategy in which testing is based solely on the requirements and specifications. Unlike its complement, white box testing, black box testing requires no knowledge of the internal paths, structure, or implementation of the software under test (SUT). The general black box testing process is: The requirements or specifications are analyzed. Valid inputs are chosen based on the specification to determine that the SUT processes them correctly. Invalid inputs must also be chosen to verify that the SUT detects them and handles them properly. Expected outputs for those inputs are determined. Tests are constructed with the selected inputs. The tests are run. Actual outputs are compared with the expected outputs. A determination is made as to the proper functioning of the SUT
  • 7. Test Case design Techniques classification Section I - Black Box Testing Techniques • Equivalence Class Testing • Boundary Value Analysis • Decision Table Testing • Pair wise Testing • State-Transition Testing • Domain Analysis Testing • Use Case Testing Section11- White Box Testing Techniques • Control Flow Testing • Data Flow Testing • Testing Paradigms Section 111: Experience based Technique • Error Guessing • Exploratory Testing
  • 8. Boundary Value Testing Introduction: Equivalence class testing is the most basic test design technique. 1.It helps testers choose a small subset of possible test cases while maintaining reasonable coverage. 2. Equivalence class testing has a second benefit. It leads us to the idea of boundary value testing, the second key test design technique to be presented.
  • 9. Continued.. 1In the previous example the following rules were given that indicate how we should process employment applications based on a person's age. The rules were: 0–16 Don't hire 16–18 Can hire on a part-time basis only 18–55 Can hire as a full-time employee 55–99 Don't hire Notice the problem at the boundaries—the "edges" of each class. The age "16" is included in two different equivalence classes (as are 18 and 55). The first rule says don't hire a 16-year-old. The second rule says a 16-year-old can be hired on a part-time basis
  • 10. Continued.. Key Point : Boundary value testing focuses on the boundaries because that is where so many defects hide. If (applicantAge >= 0 && applicantAge <=16) hireStatus="NO"; If (applicantAge >= 16 && applicantAge <=18) hireStatus="PART"; If (applicantAge >= 18 && applicantAge <=55) hireStatus="FULL"; If (applicantAge >= 55 && applicantAge <=99) hireStatus="NO"; ` Of course, the mistake that programmers make is coding inequality tests improperly. Writing > (greater than) instead of ≥ (greater than or equal) is an example. The interesting values on or near the boundaries in this example are {-1, 0, 1}, {15, 16, 17}, {17, 18, 19}, {54, 55, 56}, and {98, 99, 100}.
  • 11. Technique The steps for using boundary value testing are simple. Step 1: identify the equivalence classes. Step 2: identify the boundaries of each equivalence class. Step 3: create test cases for each boundary value by choosing one point on the boundary, one point just below the boundary, and one point just above the boundary. "Below" and "above" are relative terms and depend on the data value's units. Ex 1: If the boundary is 16 and the unit is "integer" then the "below" point is 15 and the "above" point is 17. Ex 2: If the boundary is $5.00 and the unit is "US dollars and cents" then the below point is $4.99 and the above point is $5.01. On the other hand, if the value is $5 and the unit is "US dollars" then the below point is $4 and the above point is $6. Key Point Create test cases for each boundary value by choosing one point on the boundary, one point just below the boundary, and one point just above the boundary.
  • 12. Summary •While equivalence class testing is useful, its greatest contribution is to lead us to boundary value testing. •Boundary value testing is a technique used to reduce the number of test cases to a manageable size while still maintaining reasonable coverage. •Boundary value testing focuses on the boundaries because that is where so many defects hide. Experienced testers have encountered this situation many times. •Create test cases for each boundary value by choosing one point on the boundary, one point just below the boundary, and one point just above the boundary. "Below" and "above" are relative terms and depend on the data value's units.
  • 13. Practice •ZIP Code—five numeric digits. •First consider ZIP Code just in terms of digits. Then, determine the lowest and highest legitimate ZIP Codes in the United States. For extra credit [1] , determine the format of postal codes for Canada and the lowest and highest valid values. •Last Name—one through fifteen characters (including alphabetic characters, periods, hyphens, apostrophes, spaces, and numbers). For extra credit [2] create a few very complex Last Names. Can you determine the "rules" for legitimate Last Names? For additional extra credit [3] use a phonebook from another country—try Finland or Thailand. •User ID—eight characters at least two of which are not alphabetic (numeric, special, nonprinting).
  • 14. Decision Table Testing Decision tables are an excellent tool to capture certain kinds of system requirements and to document internal system design They are used to record complex business rules that a system must implement. In addition, they can serve as a guide to creating test cases.
  • 15. Technique The general form of a decision table     Rule 1 Rule 2 Rule 3 Rule 4 Rule N Conditions             Condition-1             Condition-2             Condition-3             Condition-4             Condition-N                           Actions            
  • 16. Technique •Conditions represent various input conditions. •Actions are the actions that should be taken depending on the various combinations of input conditions. • Each of the rules defines a unique combination of conditions that result in the execution ("firing") of the actions associated with that rule. Ex: •An auto insurance company gives discounts to drivers who are married and/or good students. Let's begin with the conditions. The following decision table has two conditions, each one of which takes on the values Yes or No.
  • 17. A decision table with two binary conditions  `   Rule 1 Rule 2 Rule 3 Rule 4 Conditions           Married?    Yes Yes  No No Good Student?    Yes No Yes No
  • 18. A decision table with two binary conditions and Actions Note that the table contains all combinations of the conditions. Given two binary conditions (Yes or No), the possible combinations are {Yes, Yes}, {Yes, No}, {No, Yes}, and {No, No}. Each rule represents one of these combinations. As a tester we will verify that all combinations of the conditions are defined. Missing a combination may result in developing a system that may not process a particular set of inputs properly.  `   Rule 1 Rule 2 Rule 3 Rule 4 Conditions           Married?    Yes Yes  No No Good Student?    Yes No Yes No Action Discount ($) 40 25 20 0
  • 19. Technique A decision table with non-binary conditions.  `   Rule 1 Rule 2 Rule 3 Rule 4 Conditions           Condition 1    0-1 1-10 10-100 10- 1000 Condition 2    <5 5 6 or 7 >7 Action Action 1 Do X Do A Do Z Do C Action 2 Do Y Do X Do B Do A
  • 20. Key Point Create at least one test case for each rule. If the system under test has complex business rules, and if your business analysts or designers have not documented these rules in this form, testers should gather this information and represent it in decision table form. The reason is simple. Given the system behavior represented in this complete and compact form, test cases can be created directly from the decision table. In testing, create at least one test case for each rule. If the rule's conditions are binary, a single test for each combination is probably sufficient. On the other hand, if a condition is a range of values, consider testing at both the low and high end of the range. In this way we merge the ideas of Boundary Value testing with Decision Table testing. Key Point Create at least one test case for each rule.
  • 21. .  A decision table converted to a test case table.    Test Case 1  Test Case 2  Test Case 3  Test Case 4  Inputs          •Condition -1 Yes Yes No No •Condition -2 Yes No Yes No           Expected  Results          •Action-1 Do X Do Y Do X Do Z •Action-2 Do A Do B Do B Do B To create a test case table simply change the row and column headings
  • 22. Applicability and Limitations Decision tables are used to document complex business rules that a system must implement. In addition, they serve as a guide to creating test cases. Conditions represent various input conditions. Actions are the processes that should be executed depending on the various combinations of input conditions. Each rule defines a unique combination of conditions that result in the execution ("firing") of the actions associated with that rule. Create at least one test case for each rule. If the rule's conditions are binary, a single test for each combination is probably sufficient. On the other hand, if a condition is a range of values, consider testing at both the low and high end of the range.