SlideShare a Scribd company logo
Test Design techniques: Structured and Experienced-based techniquesAuthor: Khuong Nguyen
Structured based testing techniquesCyclomatic complexityExperienced based testing techniquesChoosing appropriate testing techniquesSample examAgenda
Understand and apply common Structured-Based Testing techniquesKnow how to calculate Cyclomatic ComplexityUnderstand Experienced-Based Testing techniquesLearn to choose appropriate testing techniques in specific circumstancesObjectives
Software testing foundationsCertified Tester Foundation Level Syllabus 2007Software Testing DictionaryBS7925-2: Component TestingReferences
Structure-based techniques
Structure-based testing/white-box testing is based on an identified structure of the software or systemIt is a method for writing a set of white-box test cases that exercise the paths in the code How to measure thoroughly the test cases exercise the codeIntroduction
Test coverage measures in some specific way the amount of testing performed by a set of tests.Wherever we can count things and can tell whether or not each of those things has been tested by some test, then we can measure coverageWhat is test coverage?
Statement testing and coverageDecision testing and coverage Other structure-based techniquesBasic white box test case design techniques
In component testing, statement coverage is the assessment of the percentage of executable statements that have been exercised by a test case suite. (TRUE OR FALSE)Statement testing derives test cases to execute specific statements, normally to increase statement coverage.Every statement is requested to be executed at least one Definition of statement coverage
Translate the source code to control flow graphDefines nodes(Statement) and control flow between statements(edges)Conditional statements(IF, CASE) and loops(WHILE, FOR) have more than one edges going outVerify that each statement have been executedSteps
ExamplesIF1IF2WHILE346ENDIF7ENDIF1  If (a>0) then 2       If (b<1) then3           While (c<2) 4               c++;5            End whileEnd IF7  End IF5Node, statementEdge, Control flow
Statement coverageIF1IF2WHILE346ENDIF7ENDIF100%SC: All nodes can be reached by  a single test case1, 2, 3, 4, 5, 6, 75
It is a very weak criterionValue of the technique:Unreachable source code (dead code) can be detectedEmpty ELSE-parts are not consideredStatement CoverageCoverage is measured by using test tools
What is minimum number of test cases required for full statement coverage?1 test for statement coverage2 tests for statement coverage3 tests for statement coverageRead PRead QIF P+Q > 100 THEN	Print “Large”ENDIFIf P > 50 THEN	Print “P Large”ENDIFExercise
Decision coverage, related to branch coverage, is the assessment of the percentage of decision outcomes (TRUE and FALSE)Require every decision outcome: all possible cases-statementDecision testing is a form of control flow testing as it generates a specific flow of control through the decision pointsDefinition of decision/branch coverage
Translate the source code to control flow graphDefines nodes(Statement) and control flow between statements(edges)Conditional statements(IF, CASE) and loops(WHILE, FOR) have more than one edges going outVerify that all possible branches of the control flow are testedSteps
It is a stronger criterion than statement coverageBe able to detect missing statement in empty branchesDecision coverage is stronger than statement coverage: 100% decision coverage guarantees 100% statement coverage, but not vice versa.Decision coverage requires test of every decision outcome: both THEN and ELSE in the IF-statement all possibilities for the CASE-statement and fall-through case both execution of the FOR loop and the bypassDecision/branch Coverage
ExamplesIF1IF2WHILE346ENDIF7ENDIF1  If (a>0) then 2       If (b<1) then3           While (c<2) 4               c++;5           End while6       End IF7   End IF5Node, statementEdge, Control flow
Decision coverageIF1IF2WHILE346ENDIF7ENDIF100%DC: All branches are executedSome edges are executed more than one51, 2, 3, 5, 3, 4, 5, 6, 71, 2, 6, 71, 7Branch coverage = (Number of executed branches / total number of branches) * 100%What is minimum number of test cases required for full decision coverage?1 test for decision coverage2 tests for decision coverage3 tests for decision coverageSwitch PC onStart “outlook”IF outlook appears THEN	Send an email   Close outlookEndifExercise
For object-oriented system, statement as well as decision coverage is inadequate.Additional coverage criteria are necessary Tools often support determining coverage, coverage data can be used to detect uncalled methods or program partsLimitations of the techniques
Data flow TestingBranch Condition TestingBranch Condition Combination TestingModified Condition Decision TestingLCSAJ TestingOther structure-based test techniques
There are stronger levels of structural coverage beyond decision coverage (condition coverage and multiple condition coverage)The concept of coverage can also be applied at other test levels (e.g. at integration level) where the percentage of modules, components or classes that have been exercised by a test case suite could be expressed as module, component or class coverageTool support is useful for the structural testing of codeThe basis of white box techniques is the source code. Adequate test case design techniques chosen depending on the complexity of the program structureOther structure-based test techniques (cont.)
Testing contains the combination of different techniquesThe expected risk guides to select testing techniques and the intensity of executionBasis of the selection of the white box technique is the structure of the test objectWhich techniques should be chosen?
Cyclomatic Complexity
Cyclomatic complexity or conditional complexity:Was developed by McCabe Is the software metric (measurement) to measure the complexity of the program’s source codeDefinition
M = E − N + 2P M = cyclomatic complexityE = the number of edges (links) of the graphN = the number of nodes of the graphP = the number of connected componentsNumber of predicates + 1How to calculate
Examples of cyclomatic complexityE=1, N=2, P=1M=1-2+2=1E=4, N=4, P=1M=4-4+2=2E=2, N=4, P=2M=2-4+4=2E=4, N=5, P=1M=4-5+2=1
Cyclomatic complexity of programming constructs11 if E then2    A   else   B4 C234E = 4, N = 4, P =1 M = 2
C
C
Predicate notes P = ?Complexity C = ?
Predicate notes P = ?Complexity C = ?
Predicate notes P = ?Complexity C = ?
Complex systems arehard to understandhard to changehard to reuseMcCabe found that modules with a cyclomatic complexity greater than 10 were hard to test and error prone.Look for procedures with high cyclomatic complexity and rewrite them, focus testing on them, or focus reviewing on them.Metrics view
Experience-based techniques
Experienced-based test design technique: Procedure to derive and/or select test cases based on the tester’s experience, knowledge and intuitionThe techniques can be useful in identifying special tests not easily captured by formal techniques, especially when applied after more formal approachesDefinition
Tester select test cases to uncover expected problems based on the skills, experienced and knowledge of the testerThe term of error guessing is used very often in practiceA commonly used experienced-based technique is error guessingIntroduction
Exploratory testingError guessingBasic experience-based test techniques
Error guessing is a test design technique where the experience of the tester is used to anticipate what defect might be present in the system under test.Testers design tests specifically to expose errorsError Guessing - Definition
Error guessing is a technique that should be used as a  complement to other formal techniquesTesters anticipate defects based on their experience, skillsKnowledge in developing similar applications and using similar technologies are also used when designing test cases.“Guess” where errors happened based on intuition and experience of tester.Error guessing
These defect and failure lists can be built based on experience, available defect and failure data, and from common knowledge about why software fails.Error guessing
Exploratory testing is test design technique where the tester actively controls the design of the test as those tests are performed and uses information gained while testing to design new and better testExploratory testing is exploring, finding out about the software:What it doesWhat it doesn’t doWhat worksWhat doesn’t workDefinition of Exploratory testing
Exploratory testing is a hands-on approach in which testers are involved in minimum planning and maximum test executionActivities in exploratory testing is concurrent:Test planning Test designTest executionTest loggingLearningMain features of exploratory testing
Result of one test case influence the design and execution of further test casesDuring testing, a “mental” model of program under test is created. It contains:How the program worksHow it behaves How it should behaveFocus on finding further aspect/behavior of the program.Main features of exploratory testing
Planning: involve the creation of the test charter that includes:Test charterShort declaration of scopeTime-boxed of effortObjectives and possible approaches to be usedTest design and test execution are performed parallel:Do not have formal documents: test conditions, test cases, test scripts…Some notes written during exploratory testing sessionTest logging is undertaken as test execution is performed.The key aspect of exploratory testing is learning about the software, its strengths and weaknessesHow to implement
ApproachExecute few test casesAnalyze resultsConsider “special” to next test casesKnowledge about the test object under test is collected
Possible elements of the test object are “explored” to decide which parts will be testedResult of Exploratory testing helps to determine which test techniques can be applied if there is time leftThe test of “test charter” should not take more than one or two hours of uninterrupted test timeBenefit
The technique is applicable when:There no poor specificationThe time is severely restricted because it uses much less time than other techniquesIt can serves to complement formal testingIt can serve to check on the test process, to help ensure that the most serious defects are found.When we use exploratory testing
Why? With which goal is the test run?What is to be tested?How? Which testing method should be used?Which problems should be found?Common questions for executing test charter
Choosing test techniques
What are the pros and cons of:Specification-based testing techniquesStructure-based testing techniquesExperience-based testing techniquesWhat is the best practice?When to use what?
The choice of which test techniques to use depends on a number of factors:the type of systemregulatory standardscustomer or contractual requirementslevel of risk, type of risktest objective, documentation availableknowledge of the testerstime and budgetdevelopment life cycle, use case modelsprevious experience of types of defects found. Which techniques should be chosen?
Testing contains the combination of different techniquesThe critically and the expected risk guide to select testing techniques and the intensity of executionBasis of the selection of the white box technique is the structure of the test objectWhich techniques should be chosen?
Thank YouKhuongNguyen, Senior Quality Control EngineerPost graduate student, Australian Business School, Funds Management, UNSW, 2032, AustraliaEmail: khuong0602@gmail.com; op_khuong_nguyen@yahoo.com
Test design techniques: Structured and Experienced-based techniques

More Related Content

What's hot (20)

PPTX
Test case design techniques
Ashutosh Garg
 
PPTX
Software testing
balamurugan.k Kalibalamurugan
 
PPTX
Black box software testing
Rana Muhammad Asif
 
PDF
What is Test Plan? Edureka
Edureka!
 
PPTX
Test case techniques
Pina Parmar
 
DOC
Manual Testing.
Dhanasekaran Nagarajan
 
PDF
Test cases
Chandra Maddigapu
 
PPTX
Test Case Design and Technique
Sachin-QA
 
PPTX
Software testing
Madhumita Chatterjee
 
PPT
Testing Metrics
PM Venkatesha Babu
 
PPTX
Test plan presentation
Peter Lebedevv
 
PPT
Basic software-testing-concepts
medsherb
 
PPT
Black Box Testing
Nivetha Padmanaban
 
PDF
How To Write A Test Case In Software Testing | Edureka
Edureka!
 
PDF
Fundamentals of Software Testing
Sagar Joshi
 
PDF
Testing concepts [3] - Software Testing Techniques (CIS640)
Venkatesh Prasad Ranganath
 
PPTX
Intro to Manual Testing
Ayah Soufan
 
PPS
Testing techniques
RaginiRohatgi
 
PPTX
Acceptance testing
COEPD HR
 
PPT
Software Testing
Ecaterina Moraru (Valica)
 
Test case design techniques
Ashutosh Garg
 
Black box software testing
Rana Muhammad Asif
 
What is Test Plan? Edureka
Edureka!
 
Test case techniques
Pina Parmar
 
Manual Testing.
Dhanasekaran Nagarajan
 
Test cases
Chandra Maddigapu
 
Test Case Design and Technique
Sachin-QA
 
Software testing
Madhumita Chatterjee
 
Testing Metrics
PM Venkatesha Babu
 
Test plan presentation
Peter Lebedevv
 
Basic software-testing-concepts
medsherb
 
Black Box Testing
Nivetha Padmanaban
 
How To Write A Test Case In Software Testing | Edureka
Edureka!
 
Fundamentals of Software Testing
Sagar Joshi
 
Testing concepts [3] - Software Testing Techniques (CIS640)
Venkatesh Prasad Ranganath
 
Intro to Manual Testing
Ayah Soufan
 
Testing techniques
RaginiRohatgi
 
Acceptance testing
COEPD HR
 
Software Testing
Ecaterina Moraru (Valica)
 

Viewers also liked (11)

PDF
structured programming Introduction to c fundamentals
OMWOMA JACKSON
 
PDF
Arrays in C
Kamruddin Nur
 
PDF
Masters Guide to Container Securing
A.Tuğsan İşiaçık Çolak
 
PDF
Equivalence Class Testing [8] - Software Testing Techniques (CIS640)
Venkatesh Prasad Ranganath
 
PDF
Equivalence partitioning
Sarjana Muda
 
PDF
4. The Software Development Process - Testing
Forrester High School
 
PPT
1. The Software Development Process - Analysis
Forrester High School
 
PPT
Reporting On The Testing Process
gavhays
 
PPT
Design Test Case Technique (Equivalence partitioning And Boundary value analy...
Ryan Tran
 
PPTX
Organization theories
SSBinny
 
PPTX
Warehousing
Sumit Malhotra
 
structured programming Introduction to c fundamentals
OMWOMA JACKSON
 
Arrays in C
Kamruddin Nur
 
Masters Guide to Container Securing
A.Tuğsan İşiaçık Çolak
 
Equivalence Class Testing [8] - Software Testing Techniques (CIS640)
Venkatesh Prasad Ranganath
 
Equivalence partitioning
Sarjana Muda
 
4. The Software Development Process - Testing
Forrester High School
 
1. The Software Development Process - Analysis
Forrester High School
 
Reporting On The Testing Process
gavhays
 
Design Test Case Technique (Equivalence partitioning And Boundary value analy...
Ryan Tran
 
Organization theories
SSBinny
 
Warehousing
Sumit Malhotra
 
Ad

Similar to Test design techniques: Structured and Experienced-based techniques (20)

PPT
Testing
nazeer pasha
 
DOC
SOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTES
suthi
 
PPTX
Unit2 for st
Poonkodi Jayakumar
 
PPT
ISTQB, ISEB Lecture Notes
onsoftwaretest
 
PPT
ISTQB / ISEB Foundation Exam Practice -1
Yogindernath Gupta
 
PPT
Testing
Muni Ram
 
PPSX
Test Case Design and Technique
ANKUR-BA
 
PPSX
Test Case Design and Technique
Fayis-QA
 
PPTX
Test Case Design & Technique
Rajesh-QA
 
PPTX
Test Case Design
Vidya-QA
 
PPT
ISTQB, ISEB Lecture Notes- 4
onsoftwaretest
 
PPTX
Automating The Process For Building Reliable Software
guest8861ff
 
PPT
testing
Rashmi Deoli
 
DOC
Testing
trashqwerty
 
PDF
Lecture 06 - 07 - 08 - Test Techniques - Whitebox Testing.pdf
mkhawar5
 
PPT
AJRA Test Strategy Discussion
ajrhem
 
PPTX
Unit - II 19CS408T - Software Testing Notes
CRohiniAsstProfCSE
 
PPT
software testing
Mayank Gupta
 
PPT
Chapter 8 Testing Tactics.ppt
VijayaPratapReddyM
 
DOCX
Manual Testing Interview Questions & Answers.docx
ssuser305f65
 
Testing
nazeer pasha
 
SOFTWARE QUALITY ASSURANCE AND TESTING - SHORT NOTES
suthi
 
Unit2 for st
Poonkodi Jayakumar
 
ISTQB, ISEB Lecture Notes
onsoftwaretest
 
ISTQB / ISEB Foundation Exam Practice -1
Yogindernath Gupta
 
Testing
Muni Ram
 
Test Case Design and Technique
ANKUR-BA
 
Test Case Design and Technique
Fayis-QA
 
Test Case Design & Technique
Rajesh-QA
 
Test Case Design
Vidya-QA
 
ISTQB, ISEB Lecture Notes- 4
onsoftwaretest
 
Automating The Process For Building Reliable Software
guest8861ff
 
testing
Rashmi Deoli
 
Testing
trashqwerty
 
Lecture 06 - 07 - 08 - Test Techniques - Whitebox Testing.pdf
mkhawar5
 
AJRA Test Strategy Discussion
ajrhem
 
Unit - II 19CS408T - Software Testing Notes
CRohiniAsstProfCSE
 
software testing
Mayank Gupta
 
Chapter 8 Testing Tactics.ppt
VijayaPratapReddyM
 
Manual Testing Interview Questions & Answers.docx
ssuser305f65
 
Ad

Recently uploaded (20)

PPTX
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PDF
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
July Patch Tuesday
Ivanti
 
PDF
Python basic programing language for automation
DanialHabibi2
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PPTX
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
PDF
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
AI Penetration Testing Essentials: A Cybersecurity Guide for 2025
defencerabbit Team
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Timothy Rottach - Ramp up on AI Use Cases, from Vector Search to AI Agents wi...
AWS Chicago
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Agentic AI lifecycle for Enterprise Hyper-Automation
Debmalya Biswas
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
How Startups Are Growing Faster with App Developers in Australia.pdf
India App Developer
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
July Patch Tuesday
Ivanti
 
Python basic programing language for automation
DanialHabibi2
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Q2 FY26 Tableau User Group Leader Quarterly Call
lward7
 
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Safe Software
 
Presentation - Vibe Coding The Future of Tech
yanuarsinggih1
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 

Test design techniques: Structured and Experienced-based techniques

  • 1. Test Design techniques: Structured and Experienced-based techniquesAuthor: Khuong Nguyen
  • 2. Structured based testing techniquesCyclomatic complexityExperienced based testing techniquesChoosing appropriate testing techniquesSample examAgenda
  • 3. Understand and apply common Structured-Based Testing techniquesKnow how to calculate Cyclomatic ComplexityUnderstand Experienced-Based Testing techniquesLearn to choose appropriate testing techniques in specific circumstancesObjectives
  • 4. Software testing foundationsCertified Tester Foundation Level Syllabus 2007Software Testing DictionaryBS7925-2: Component TestingReferences
  • 6. Structure-based testing/white-box testing is based on an identified structure of the software or systemIt is a method for writing a set of white-box test cases that exercise the paths in the code How to measure thoroughly the test cases exercise the codeIntroduction
  • 7. Test coverage measures in some specific way the amount of testing performed by a set of tests.Wherever we can count things and can tell whether or not each of those things has been tested by some test, then we can measure coverageWhat is test coverage?
  • 8. Statement testing and coverageDecision testing and coverage Other structure-based techniquesBasic white box test case design techniques
  • 9. In component testing, statement coverage is the assessment of the percentage of executable statements that have been exercised by a test case suite. (TRUE OR FALSE)Statement testing derives test cases to execute specific statements, normally to increase statement coverage.Every statement is requested to be executed at least one Definition of statement coverage
  • 10. Translate the source code to control flow graphDefines nodes(Statement) and control flow between statements(edges)Conditional statements(IF, CASE) and loops(WHILE, FOR) have more than one edges going outVerify that each statement have been executedSteps
  • 11. ExamplesIF1IF2WHILE346ENDIF7ENDIF1 If (a>0) then 2 If (b<1) then3 While (c<2) 4 c++;5 End whileEnd IF7 End IF5Node, statementEdge, Control flow
  • 12. Statement coverageIF1IF2WHILE346ENDIF7ENDIF100%SC: All nodes can be reached by a single test case1, 2, 3, 4, 5, 6, 75
  • 13. It is a very weak criterionValue of the technique:Unreachable source code (dead code) can be detectedEmpty ELSE-parts are not consideredStatement CoverageCoverage is measured by using test tools
  • 14. What is minimum number of test cases required for full statement coverage?1 test for statement coverage2 tests for statement coverage3 tests for statement coverageRead PRead QIF P+Q > 100 THEN Print “Large”ENDIFIf P > 50 THEN Print “P Large”ENDIFExercise
  • 15. Decision coverage, related to branch coverage, is the assessment of the percentage of decision outcomes (TRUE and FALSE)Require every decision outcome: all possible cases-statementDecision testing is a form of control flow testing as it generates a specific flow of control through the decision pointsDefinition of decision/branch coverage
  • 16. Translate the source code to control flow graphDefines nodes(Statement) and control flow between statements(edges)Conditional statements(IF, CASE) and loops(WHILE, FOR) have more than one edges going outVerify that all possible branches of the control flow are testedSteps
  • 17. It is a stronger criterion than statement coverageBe able to detect missing statement in empty branchesDecision coverage is stronger than statement coverage: 100% decision coverage guarantees 100% statement coverage, but not vice versa.Decision coverage requires test of every decision outcome: both THEN and ELSE in the IF-statement all possibilities for the CASE-statement and fall-through case both execution of the FOR loop and the bypassDecision/branch Coverage
  • 18. ExamplesIF1IF2WHILE346ENDIF7ENDIF1 If (a>0) then 2 If (b<1) then3 While (c<2) 4 c++;5 End while6 End IF7 End IF5Node, statementEdge, Control flow
  • 19. Decision coverageIF1IF2WHILE346ENDIF7ENDIF100%DC: All branches are executedSome edges are executed more than one51, 2, 3, 5, 3, 4, 5, 6, 71, 2, 6, 71, 7Branch coverage = (Number of executed branches / total number of branches) * 100%What is minimum number of test cases required for full decision coverage?1 test for decision coverage2 tests for decision coverage3 tests for decision coverageSwitch PC onStart “outlook”IF outlook appears THEN Send an email Close outlookEndifExercise
  • 20. For object-oriented system, statement as well as decision coverage is inadequate.Additional coverage criteria are necessary Tools often support determining coverage, coverage data can be used to detect uncalled methods or program partsLimitations of the techniques
  • 21. Data flow TestingBranch Condition TestingBranch Condition Combination TestingModified Condition Decision TestingLCSAJ TestingOther structure-based test techniques
  • 22. There are stronger levels of structural coverage beyond decision coverage (condition coverage and multiple condition coverage)The concept of coverage can also be applied at other test levels (e.g. at integration level) where the percentage of modules, components or classes that have been exercised by a test case suite could be expressed as module, component or class coverageTool support is useful for the structural testing of codeThe basis of white box techniques is the source code. Adequate test case design techniques chosen depending on the complexity of the program structureOther structure-based test techniques (cont.)
  • 23. Testing contains the combination of different techniquesThe expected risk guides to select testing techniques and the intensity of executionBasis of the selection of the white box technique is the structure of the test objectWhich techniques should be chosen?
  • 25. Cyclomatic complexity or conditional complexity:Was developed by McCabe Is the software metric (measurement) to measure the complexity of the program’s source codeDefinition
  • 26. M = E − N + 2P M = cyclomatic complexityE = the number of edges (links) of the graphN = the number of nodes of the graphP = the number of connected componentsNumber of predicates + 1How to calculate
  • 27. Examples of cyclomatic complexityE=1, N=2, P=1M=1-2+2=1E=4, N=4, P=1M=4-4+2=2E=2, N=4, P=2M=2-4+4=2E=4, N=5, P=1M=4-5+2=1
  • 28. Cyclomatic complexity of programming constructs11 if E then2 A else B4 C234E = 4, N = 4, P =1 M = 2
  • 29. C
  • 30. C
  • 31. Predicate notes P = ?Complexity C = ?
  • 32. Predicate notes P = ?Complexity C = ?
  • 33. Predicate notes P = ?Complexity C = ?
  • 34. Complex systems arehard to understandhard to changehard to reuseMcCabe found that modules with a cyclomatic complexity greater than 10 were hard to test and error prone.Look for procedures with high cyclomatic complexity and rewrite them, focus testing on them, or focus reviewing on them.Metrics view
  • 36. Experienced-based test design technique: Procedure to derive and/or select test cases based on the tester’s experience, knowledge and intuitionThe techniques can be useful in identifying special tests not easily captured by formal techniques, especially when applied after more formal approachesDefinition
  • 37. Tester select test cases to uncover expected problems based on the skills, experienced and knowledge of the testerThe term of error guessing is used very often in practiceA commonly used experienced-based technique is error guessingIntroduction
  • 38. Exploratory testingError guessingBasic experience-based test techniques
  • 39. Error guessing is a test design technique where the experience of the tester is used to anticipate what defect might be present in the system under test.Testers design tests specifically to expose errorsError Guessing - Definition
  • 40. Error guessing is a technique that should be used as a complement to other formal techniquesTesters anticipate defects based on their experience, skillsKnowledge in developing similar applications and using similar technologies are also used when designing test cases.“Guess” where errors happened based on intuition and experience of tester.Error guessing
  • 41. These defect and failure lists can be built based on experience, available defect and failure data, and from common knowledge about why software fails.Error guessing
  • 42. Exploratory testing is test design technique where the tester actively controls the design of the test as those tests are performed and uses information gained while testing to design new and better testExploratory testing is exploring, finding out about the software:What it doesWhat it doesn’t doWhat worksWhat doesn’t workDefinition of Exploratory testing
  • 43. Exploratory testing is a hands-on approach in which testers are involved in minimum planning and maximum test executionActivities in exploratory testing is concurrent:Test planning Test designTest executionTest loggingLearningMain features of exploratory testing
  • 44. Result of one test case influence the design and execution of further test casesDuring testing, a “mental” model of program under test is created. It contains:How the program worksHow it behaves How it should behaveFocus on finding further aspect/behavior of the program.Main features of exploratory testing
  • 45. Planning: involve the creation of the test charter that includes:Test charterShort declaration of scopeTime-boxed of effortObjectives and possible approaches to be usedTest design and test execution are performed parallel:Do not have formal documents: test conditions, test cases, test scripts…Some notes written during exploratory testing sessionTest logging is undertaken as test execution is performed.The key aspect of exploratory testing is learning about the software, its strengths and weaknessesHow to implement
  • 46. ApproachExecute few test casesAnalyze resultsConsider “special” to next test casesKnowledge about the test object under test is collected
  • 47. Possible elements of the test object are “explored” to decide which parts will be testedResult of Exploratory testing helps to determine which test techniques can be applied if there is time leftThe test of “test charter” should not take more than one or two hours of uninterrupted test timeBenefit
  • 48. The technique is applicable when:There no poor specificationThe time is severely restricted because it uses much less time than other techniquesIt can serves to complement formal testingIt can serve to check on the test process, to help ensure that the most serious defects are found.When we use exploratory testing
  • 49. Why? With which goal is the test run?What is to be tested?How? Which testing method should be used?Which problems should be found?Common questions for executing test charter
  • 51. What are the pros and cons of:Specification-based testing techniquesStructure-based testing techniquesExperience-based testing techniquesWhat is the best practice?When to use what?
  • 52. The choice of which test techniques to use depends on a number of factors:the type of systemregulatory standardscustomer or contractual requirementslevel of risk, type of risktest objective, documentation availableknowledge of the testerstime and budgetdevelopment life cycle, use case modelsprevious experience of types of defects found. Which techniques should be chosen?
  • 53. Testing contains the combination of different techniquesThe critically and the expected risk guide to select testing techniques and the intensity of executionBasis of the selection of the white box technique is the structure of the test objectWhich techniques should be chosen?
  • 54. Thank YouKhuongNguyen, Senior Quality Control EngineerPost graduate student, Australian Business School, Funds Management, UNSW, 2032, AustraliaEmail: [email protected]; [email protected]

Editor's Notes

  • #8: what is test case coverage? What is code coverage? How can you ensure that your test case covers all requirements? could you name some coverage items? + coverage items may be requirements, function calls, modules, objects, menu options, screens, buttons, transition steps, dropdown items, business transactions… + EP: percentage of equivalence partitions exercised + BVA: percentage of boundaries exercised + Decision tables: percentage of business rules or decision table columns tested + State transition testing: Percentage of states visited Percentage of (valid) transitions exercised Percentage of pairs of valid transitions exercised (1-switch coverage, 2-switch coverage) Percentage of invalid transitions exercised (state table)- What is the coverage interested by business analysts, testers or users?- What is the coverage interested by developers?
  • #10: In reality, 100% statement coverage is time-consuming and could be achieved only by strict requirement from client. Normally, 80% of code coverage is good enough.
  • #13: - To reach 100%SC, choose what test data? How about 1, 7? Test data? How many percentage? How about 1, 2, 6, 7? Test data? How many percentage?
  • #15: Answer: aP = 40, Q = 70, %SC = ?  7/8P = 60, Q = 60, %SC = ?  8/8
  • #21: Answer: b1, 2, 3, 4, 51, 2, 3, 5Outlook does not disappear, %DC = 50%
  • #23: Reference BS7925-2, Software Testing Foundations (ISTQB)
  • #31: a= (b+c) counts as 1 predicate
  • #33: Answer: P = 4, C = 5
  • #34: Answer: P = 5, C = 6
  • #35: Answer: P = 5, C = 6
  • #53: One drawback of code coverage measurement is that it measures coverage of what has been written, i.e. the code itself; it cannot say anything about the software that has not been written. If a specified function has not been implemented, specification-based testing techniques will reveal this. If a function was omitted from the specification, then experience-based techniques may find it. But structure-based techniques can only look at a structure which is already there. Best practice is to use all those techniques: spec-based and structure-based followed by exp-based testing techniques. Keep in the mind of objective of each technique.
  • #54: Test objective is the most important