SlideShare una empresa de Scribd logo
1 de 29
Descargar para leer sin conexión
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Agenda:
Test Design Techniques
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
What is a testing technique?
• A procedure for selecting or designing tests.
• Based on a structural or functional model of the software.
• Successful at finding faults.
• Best practice.
• A way of deriving good test cases.
• A way of objectively measuring a test effort.
Note: Testing should be rigorous, thorough and
systematic.
2www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
Advantages of Techniques:
• Different People:
– Higher probability to find similar faults.
– Gain some independence of thought
• Effective Testing:
– Finds more faults
– Focus attention on specific types of fault
– Know you're testing the right thing
3www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
Advantages of Techniques:
• Efficient Testing:
– Find more faults with less effort
– Avoid duplication
– Systematic techniques are measurable
Note: Using techniques makes testing much more effective.
4www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
Advantages of Techniques:
• Efficient Testing:
– Find more faults with less effort
– Avoid duplication
– Systematic techniques are measurable
Note: Using techniques makes testing much more effective.
5www.talentsprint.com
6
Introduction to Testing Techniques
Testing
Techniques
Scripted Testing
Experience
Based Testing
Static
Testing
Dynamic
Testing
Tool-Based
Testing
People-Based
Testing
Black Box
Testing
White Box
Testing
Error-Guessing
Technique
Error-Guessing
Testing
Technique
7
Based on behavior /
functionality of software
Based on structure of
software
Introduction to Testing Techniques
Examination of
documentation, source code
listings, etc.
Static
(Non-execution)
Behavioral
(Black Box)
Structural
(White Box)
Types of Systematic Techniques
Dynamic Testing
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
Scripted Testing:
• People Based Testing
• Tool Based Testing
8www.talentsprint.com
Reviews
Walkthroughs
Desk-checking
Static AnalysisInspection
etc.
Static
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
When is scripted testing used?
• Repeatability:
– When the tests are detailed enough so that some one other than the
author to execute it in an identical way.
• Objectivity:
– Test creation does not depend on the extraordinary skill of the
person creating the test but is based on well understood test design
principles.
• Auditability: Traceability from requirements, design, and code to
the test cases and back again.
9www.talentsprint.com
10
IEEE 829 Test Documents?
Scripted Testing
Test Plan
Test Design
Specification
Test Log
Test
Incident
Report
Test
Execution
Test Item
Transmittal
Report
Test Case
Specification
Test Procedure
Specification
Test
Summary
Report
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
Dynamic Testing:
– White Box Test Design Techniques
– Black Box Test Design Techniques
11www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
White Box Test Design Techniques:
• The main objective of white box testing is to ensure 100%
code coverage.
Code coverage:
• The percentage of code tested during white box testing is called code
coverage.
• The source code behind a unit may contain a set of statements, a set of
conditions and a set of branches. If all these are tested, then we say
100% code coverage is achieved.
12www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
Why White Box Test Design Techniques:
• As testing everything at code level may be impossible.
• To avoid this, at the same to ensure 100% code coverage
the following techniques are introduced in white box
testing.
13www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
White Box Test Design Techniques:
• Statement Coverage
• Branch/Condition/ Decision Coverage
• Path Coverage
• Cyclomatic Complexity
14www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
White Box Test Design Techniques:
Statement Coverage:
• The percentage of statements tested during white box
testing is called statement coverage.
• Statement coverage=
(Number of statements tested/total number of statements) x 100
15www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
White Box Test Design Techniques:
Branch/ Decision/ Condition Coverage:
• The percentage of branches tested during white box
testing is called branch coverage.
• Branch coverage=
(Number of branches tested/total number of branches) x 100
16www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
White Box Test Design Techniques:
Path Coverage:
• The percentage of paths tested during white box testing is
called path coverage.
• Path coverage=
(Number of paths tested/total number of paths) x 100
17www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
White Box Test Design Techniques:
Cyclomatic Complexity:
• Cyclomatic complexity is a source code complexity
measurement that is being correlated to a number of
coding errors.
• It is calculated by developing a Control Flow Graph of the
code that measures the number of linearly-independent
paths through a program module.
18www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
White Box Test Design Techniques:
Cyclomatic Complexity:
Cyclomatic complexity =E - N + P
where,
E = number of edges in the flow graph.(Lines)
N = number of nodes in the flow graph.(Shapes)
P = number of nodes that have exit points
19www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
White Box Test Design Techniques:
Cyclomatic Complexity:
• Cyclomatic Complexity C = Number of Decision Points
(i.e. the Decision Boxes in Flow diagram) + 1
20www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
Points to Remember:
• 100% LCSAJ will ensure 100% branch coverage.
• 100% branch coverage will ensure 100% statement
coverage.
• 100% path coverage will ensure 100% statement
coverage.
• 100% path coverage will ensure 100% branch coverage.
• Best Technique: Path Coverage.
21www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
Case Study :
• Consider a code and how many minimum number of tests are required
to cover 100% Statement & Branch & Path coverage & what is
Cyclomatic Complexity?
Read P
Read Q
IF P+Q >100 then
Print “Large”
End IF
IF P>50 then
Print “ P Bigger”
End IF
22www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
Assignment-1
Read A
If A>0 then
If A>21 then
Print “Key”
End IF
End If
23www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
Assignment-2
Read A
Read B
If A>0 then
if B=0 then
Print “No Values”
else
Print B
if A>21 then
Print A
End If
End IF
End If
24www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
Assignment-3
Read A
Read B
If A<0 then
Print “A Negative”
else
Print “A Positive”
End IF
If B<0 then
Print “B Negative”
else
Print “B Positive”
End If
25www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
Assignment-4
Read A
Read B
If A<0 then
Print “A Negative”
End IF
If B<0 then
Print “B Negative”
End If
26www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Test Design Techniques:
Assignment-5
Read A
If A<0 then
Print “A Negative”
End IF
If A>0 then
Print “A Positive”
End If
27www.talentsprint.com
DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL
Review Questions:
28www.talentsprint.com
White Box Testing Techniques:
• The Structure-Based or White Box Testing Techniques, as described
in BS 7925-2 standards, are :
– Statement Testing
– Branch / Decision Testing
– Data Flow Testing
– Branch Condition Testing
– Branch Condition Combination Testing
– Modified Condition Decision Testing
– LCSAJ (Linear Code Sequence and Jump) Testing
Note: All these techniques can also be used as Measurement Techniques.
29
Question and Answer

Más contenido relacionado

Destacado (8)

Mt s1 basic_fundamentals
Mt s1 basic_fundamentalsMt s1 basic_fundamentals
Mt s1 basic_fundamentals
 
Qtp
QtpQtp
Qtp
 
Sql
SqlSql
Sql
 
Istqb question-paper-dump-12
Istqb question-paper-dump-12Istqb question-paper-dump-12
Istqb question-paper-dump-12
 
Istqb question-paper-dump-11
Istqb question-paper-dump-11Istqb question-paper-dump-11
Istqb question-paper-dump-11
 
Istqb question-paper-dump-1
Istqb question-paper-dump-1Istqb question-paper-dump-1
Istqb question-paper-dump-1
 
Software Testing Fundamentals
Software Testing FundamentalsSoftware Testing Fundamentals
Software Testing Fundamentals
 
Software testing ppt
Software testing pptSoftware testing ppt
Software testing ppt
 

Similar a Mt s8 wbt_test_designtechniques

Test Design with Action-based Testing Methodology - Ngo Hoang Minh
Test Design with Action-based Testing Methodology - Ngo Hoang MinhTest Design with Action-based Testing Methodology - Ngo Hoang Minh
Test Design with Action-based Testing Methodology - Ngo Hoang Minh
Ho Chi Minh City Software Testing Club
 

Similar a Mt s8 wbt_test_designtechniques (20)

Class9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfClass9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdf
 
Code coverage
Code coverageCode coverage
Code coverage
 
Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic Testing
 
Metrics-driven Continuous Delivery
Metrics-driven Continuous DeliveryMetrics-driven Continuous Delivery
Metrics-driven Continuous Delivery
 
Pragmatic Code Coverage
Pragmatic Code CoveragePragmatic Code Coverage
Pragmatic Code Coverage
 
Small is Beautiful- Fully Automate your Test Case Design
Small is Beautiful- Fully Automate your Test Case DesignSmall is Beautiful- Fully Automate your Test Case Design
Small is Beautiful- Fully Automate your Test Case Design
 
White box testing
White box testingWhite box testing
White box testing
 
Test Design with Action-based Testing Methodology - Ngo Hoang Minh
Test Design with Action-based Testing Methodology - Ngo Hoang MinhTest Design with Action-based Testing Methodology - Ngo Hoang Minh
Test Design with Action-based Testing Methodology - Ngo Hoang Minh
 
Introduction to White box testing
Introduction to White box testingIntroduction to White box testing
Introduction to White box testing
 
Software Testing Process & Trend
Software Testing Process & TrendSoftware Testing Process & Trend
Software Testing Process & Trend
 
Best Practices on Driving Design Decisions with Simulation
Best Practices on Driving Design Decisions with SimulationBest Practices on Driving Design Decisions with Simulation
Best Practices on Driving Design Decisions with Simulation
 
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
 
Lavenya Testing.pptx
Lavenya Testing.pptxLavenya Testing.pptx
Lavenya Testing.pptx
 
Software testing: an introduction - 2015
Software testing: an introduction - 2015Software testing: an introduction - 2015
Software testing: an introduction - 2015
 
Unit 2 Unit level testing.ppt
Unit 2 Unit level testing.pptUnit 2 Unit level testing.ppt
Unit 2 Unit level testing.ppt
 
How To Write A Test Case In Software Testing | Edureka
How To Write A Test Case In Software Testing | EdurekaHow To Write A Test Case In Software Testing | Edureka
How To Write A Test Case In Software Testing | Edureka
 
Deep Dive into Software Estimation - Texavi Tech Bootcamp on How to be a good...
Deep Dive into Software Estimation - Texavi Tech Bootcamp on How to be a good...Deep Dive into Software Estimation - Texavi Tech Bootcamp on How to be a good...
Deep Dive into Software Estimation - Texavi Tech Bootcamp on How to be a good...
 
Test case design techniques
Test case design techniquesTest case design techniques
Test case design techniques
 
Test case design techniques
Test case design techniquesTest case design techniques
Test case design techniques
 
Testing, a pragmatic approach
Testing, a pragmatic approachTesting, a pragmatic approach
Testing, a pragmatic approach
 

Más de TestingGeeks

Istqb question-paper-dump-14
Istqb question-paper-dump-14Istqb question-paper-dump-14
Istqb question-paper-dump-14
TestingGeeks
 
Istqb question-paper-dump-13
Istqb question-paper-dump-13Istqb question-paper-dump-13
Istqb question-paper-dump-13
TestingGeeks
 
Istqb question-paper-dump-10
Istqb question-paper-dump-10Istqb question-paper-dump-10
Istqb question-paper-dump-10
TestingGeeks
 
Istqb question-paper-dump-9
Istqb question-paper-dump-9Istqb question-paper-dump-9
Istqb question-paper-dump-9
TestingGeeks
 
Istqb question-paper-dump-8
Istqb question-paper-dump-8Istqb question-paper-dump-8
Istqb question-paper-dump-8
TestingGeeks
 
Istqb question-paper-dump-7
Istqb question-paper-dump-7Istqb question-paper-dump-7
Istqb question-paper-dump-7
TestingGeeks
 
Istqb question-paper-dump-6
Istqb question-paper-dump-6Istqb question-paper-dump-6
Istqb question-paper-dump-6
TestingGeeks
 
Istqb question-paper-dump-5
Istqb question-paper-dump-5Istqb question-paper-dump-5
Istqb question-paper-dump-5
TestingGeeks
 
Istqb question-paper-dump-4
Istqb question-paper-dump-4Istqb question-paper-dump-4
Istqb question-paper-dump-4
TestingGeeks
 
Istqb question-paper-dump-3
Istqb question-paper-dump-3Istqb question-paper-dump-3
Istqb question-paper-dump-3
TestingGeeks
 
Istqb question-paper-dump-2
Istqb question-paper-dump-2Istqb question-paper-dump-2
Istqb question-paper-dump-2
TestingGeeks
 
Istqb iseb bh0-010-ajoy_singha
Istqb iseb bh0-010-ajoy_singhaIstqb iseb bh0-010-ajoy_singha
Istqb iseb bh0-010-ajoy_singha
TestingGeeks
 
Istqb exam sample_paper_2
Istqb exam sample_paper_2Istqb exam sample_paper_2
Istqb exam sample_paper_2
TestingGeeks
 
Istqb exam sample_paper_3
Istqb exam sample_paper_3Istqb exam sample_paper_3
Istqb exam sample_paper_3
TestingGeeks
 
Istqb exam sample_paper_1
Istqb exam sample_paper_1Istqb exam sample_paper_1
Istqb exam sample_paper_1
TestingGeeks
 
Istqb sample paper 2011- www.ajoysingha.info
Istqb sample paper   2011- www.ajoysingha.infoIstqb sample paper   2011- www.ajoysingha.info
Istqb sample paper 2011- www.ajoysingha.info
TestingGeeks
 
Answers to-500-istqb-sample-papers-2010-2011
Answers to-500-istqb-sample-papers-2010-2011Answers to-500-istqb-sample-papers-2010-2011
Answers to-500-istqb-sample-papers-2010-2011
TestingGeeks
 

Más de TestingGeeks (20)

Qtp ans
Qtp ansQtp ans
Qtp ans
 
Selenium
SeleniumSelenium
Selenium
 
Password
PasswordPassword
Password
 
Istqb question-paper-dump-14
Istqb question-paper-dump-14Istqb question-paper-dump-14
Istqb question-paper-dump-14
 
Istqb question-paper-dump-13
Istqb question-paper-dump-13Istqb question-paper-dump-13
Istqb question-paper-dump-13
 
Istqb question-paper-dump-10
Istqb question-paper-dump-10Istqb question-paper-dump-10
Istqb question-paper-dump-10
 
Istqb question-paper-dump-9
Istqb question-paper-dump-9Istqb question-paper-dump-9
Istqb question-paper-dump-9
 
Istqb question-paper-dump-8
Istqb question-paper-dump-8Istqb question-paper-dump-8
Istqb question-paper-dump-8
 
Istqb question-paper-dump-7
Istqb question-paper-dump-7Istqb question-paper-dump-7
Istqb question-paper-dump-7
 
Istqb question-paper-dump-6
Istqb question-paper-dump-6Istqb question-paper-dump-6
Istqb question-paper-dump-6
 
Istqb question-paper-dump-5
Istqb question-paper-dump-5Istqb question-paper-dump-5
Istqb question-paper-dump-5
 
Istqb question-paper-dump-4
Istqb question-paper-dump-4Istqb question-paper-dump-4
Istqb question-paper-dump-4
 
Istqb question-paper-dump-3
Istqb question-paper-dump-3Istqb question-paper-dump-3
Istqb question-paper-dump-3
 
Istqb question-paper-dump-2
Istqb question-paper-dump-2Istqb question-paper-dump-2
Istqb question-paper-dump-2
 
Istqb iseb bh0-010-ajoy_singha
Istqb iseb bh0-010-ajoy_singhaIstqb iseb bh0-010-ajoy_singha
Istqb iseb bh0-010-ajoy_singha
 
Istqb exam sample_paper_2
Istqb exam sample_paper_2Istqb exam sample_paper_2
Istqb exam sample_paper_2
 
Istqb exam sample_paper_3
Istqb exam sample_paper_3Istqb exam sample_paper_3
Istqb exam sample_paper_3
 
Istqb exam sample_paper_1
Istqb exam sample_paper_1Istqb exam sample_paper_1
Istqb exam sample_paper_1
 
Istqb sample paper 2011- www.ajoysingha.info
Istqb sample paper   2011- www.ajoysingha.infoIstqb sample paper   2011- www.ajoysingha.info
Istqb sample paper 2011- www.ajoysingha.info
 
Answers to-500-istqb-sample-papers-2010-2011
Answers to-500-istqb-sample-papers-2010-2011Answers to-500-istqb-sample-papers-2010-2011
Answers to-500-istqb-sample-papers-2010-2011
 

Mt s8 wbt_test_designtechniques

  • 1. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Agenda: Test Design Techniques
  • 2. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: What is a testing technique? • A procedure for selecting or designing tests. • Based on a structural or functional model of the software. • Successful at finding faults. • Best practice. • A way of deriving good test cases. • A way of objectively measuring a test effort. Note: Testing should be rigorous, thorough and systematic. 2www.talentsprint.com
  • 3. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: Advantages of Techniques: • Different People: – Higher probability to find similar faults. – Gain some independence of thought • Effective Testing: – Finds more faults – Focus attention on specific types of fault – Know you're testing the right thing 3www.talentsprint.com
  • 4. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: Advantages of Techniques: • Efficient Testing: – Find more faults with less effort – Avoid duplication – Systematic techniques are measurable Note: Using techniques makes testing much more effective. 4www.talentsprint.com
  • 5. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: Advantages of Techniques: • Efficient Testing: – Find more faults with less effort – Avoid duplication – Systematic techniques are measurable Note: Using techniques makes testing much more effective. 5www.talentsprint.com
  • 6. 6 Introduction to Testing Techniques Testing Techniques Scripted Testing Experience Based Testing Static Testing Dynamic Testing Tool-Based Testing People-Based Testing Black Box Testing White Box Testing Error-Guessing Technique Error-Guessing Testing Technique
  • 7. 7 Based on behavior / functionality of software Based on structure of software Introduction to Testing Techniques Examination of documentation, source code listings, etc. Static (Non-execution) Behavioral (Black Box) Structural (White Box) Types of Systematic Techniques Dynamic Testing
  • 8. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: Scripted Testing: • People Based Testing • Tool Based Testing 8www.talentsprint.com Reviews Walkthroughs Desk-checking Static AnalysisInspection etc. Static
  • 9. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: When is scripted testing used? • Repeatability: – When the tests are detailed enough so that some one other than the author to execute it in an identical way. • Objectivity: – Test creation does not depend on the extraordinary skill of the person creating the test but is based on well understood test design principles. • Auditability: Traceability from requirements, design, and code to the test cases and back again. 9www.talentsprint.com
  • 10. 10 IEEE 829 Test Documents? Scripted Testing Test Plan Test Design Specification Test Log Test Incident Report Test Execution Test Item Transmittal Report Test Case Specification Test Procedure Specification Test Summary Report
  • 11. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: Dynamic Testing: – White Box Test Design Techniques – Black Box Test Design Techniques 11www.talentsprint.com
  • 12. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: White Box Test Design Techniques: • The main objective of white box testing is to ensure 100% code coverage. Code coverage: • The percentage of code tested during white box testing is called code coverage. • The source code behind a unit may contain a set of statements, a set of conditions and a set of branches. If all these are tested, then we say 100% code coverage is achieved. 12www.talentsprint.com
  • 13. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: Why White Box Test Design Techniques: • As testing everything at code level may be impossible. • To avoid this, at the same to ensure 100% code coverage the following techniques are introduced in white box testing. 13www.talentsprint.com
  • 14. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: White Box Test Design Techniques: • Statement Coverage • Branch/Condition/ Decision Coverage • Path Coverage • Cyclomatic Complexity 14www.talentsprint.com
  • 15. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: White Box Test Design Techniques: Statement Coverage: • The percentage of statements tested during white box testing is called statement coverage. • Statement coverage= (Number of statements tested/total number of statements) x 100 15www.talentsprint.com
  • 16. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: White Box Test Design Techniques: Branch/ Decision/ Condition Coverage: • The percentage of branches tested during white box testing is called branch coverage. • Branch coverage= (Number of branches tested/total number of branches) x 100 16www.talentsprint.com
  • 17. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: White Box Test Design Techniques: Path Coverage: • The percentage of paths tested during white box testing is called path coverage. • Path coverage= (Number of paths tested/total number of paths) x 100 17www.talentsprint.com
  • 18. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: White Box Test Design Techniques: Cyclomatic Complexity: • Cyclomatic complexity is a source code complexity measurement that is being correlated to a number of coding errors. • It is calculated by developing a Control Flow Graph of the code that measures the number of linearly-independent paths through a program module. 18www.talentsprint.com
  • 19. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: White Box Test Design Techniques: Cyclomatic Complexity: Cyclomatic complexity =E - N + P where, E = number of edges in the flow graph.(Lines) N = number of nodes in the flow graph.(Shapes) P = number of nodes that have exit points 19www.talentsprint.com
  • 20. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: White Box Test Design Techniques: Cyclomatic Complexity: • Cyclomatic Complexity C = Number of Decision Points (i.e. the Decision Boxes in Flow diagram) + 1 20www.talentsprint.com
  • 21. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: Points to Remember: • 100% LCSAJ will ensure 100% branch coverage. • 100% branch coverage will ensure 100% statement coverage. • 100% path coverage will ensure 100% statement coverage. • 100% path coverage will ensure 100% branch coverage. • Best Technique: Path Coverage. 21www.talentsprint.com
  • 22. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: Case Study : • Consider a code and how many minimum number of tests are required to cover 100% Statement & Branch & Path coverage & what is Cyclomatic Complexity? Read P Read Q IF P+Q >100 then Print “Large” End IF IF P>50 then Print “ P Bigger” End IF 22www.talentsprint.com
  • 23. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: Assignment-1 Read A If A>0 then If A>21 then Print “Key” End IF End If 23www.talentsprint.com
  • 24. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: Assignment-2 Read A Read B If A>0 then if B=0 then Print “No Values” else Print B if A>21 then Print A End If End IF End If 24www.talentsprint.com
  • 25. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: Assignment-3 Read A Read B If A<0 then Print “A Negative” else Print “A Positive” End IF If B<0 then Print “B Negative” else Print “B Positive” End If 25www.talentsprint.com
  • 26. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: Assignment-4 Read A Read B If A<0 then Print “A Negative” End IF If B<0 then Print “B Negative” End If 26www.talentsprint.com
  • 27. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Test Design Techniques: Assignment-5 Read A If A<0 then Print “A Negative” End IF If A>0 then Print “A Positive” End If 27www.talentsprint.com
  • 28. DO NOT DISTRIBUTE – HIGHLY CONFIDENTIAL Review Questions: 28www.talentsprint.com White Box Testing Techniques: • The Structure-Based or White Box Testing Techniques, as described in BS 7925-2 standards, are : – Statement Testing – Branch / Decision Testing – Data Flow Testing – Branch Condition Testing – Branch Condition Combination Testing – Modified Condition Decision Testing – LCSAJ (Linear Code Sequence and Jump) Testing Note: All these techniques can also be used as Measurement Techniques.