SlideShare a Scribd company logo
Software Testing Techniques Instructor: Dr. Jerry Gao
Software Testing Techniques Jerry Gao, Ph.D. Jan.  1999 - Software Testing Fundamentals - Testing Objectives, Principles, Testability - Software Test Case Design - White-Box Testing - Cyclomatic Complexity - Graph Matrices - Control Structuring Testing (not included) - Condition Testing (not included) - Data Flow Testing (not included) - Loop Testing (not included) - Black-Box Testing - Graph-based Testing Methods (not included) - Equivalence Partitioning - Boundary Value Analysis - Comparison Testing (not included)
Software Testing Fundamentals Software testing is a critical element of software quality assurance and represents the ultimate review of specification, design, and coding. Software testing demonstrates that software function appear to be working according to specifications and performance requirements. Testing Objectives: Myers [MYE79] states a number of rules that can serve well as testing objectives: - Testing is a process of executing a program with the intent of finding an error. - A good test case is one that has high probability of finding an undiscovered error. - A successful test is one that uncovers an as-yet undiscovered error. The  major testing objective  is to design tests that systematically uncover types of errors with minimum time and effort.
Software Testing Principles Davids [DAV95] suggests a set of testing principles: - All tests should be traceable to customer requirements. - Tests should be planned long before testing begins. - The Pareto principle applies to software testing. - 80% of all errors uncovered during testing will likely be traceable to 20% of all program modules. - Testing should begin “in the small” and progress toward testing “in the large”. - Exhaustive testing is not possible. - To be most effective, testing should be conducted by an independent third party.
Software Testability According to James Bach: Software testability  is simply how easily a computer program can be tested. A set of program characteristics that lead to testable software: - Operability: “the better it works, the more efficiently it can be tested.” - Observability: “What you see is what you test.” - Controllability: “The better we can control the software, the more the testing can be automated and optimized.” - Decomposability: “By controlling the scope of testing, we can more quickly isolate problems and perform smarter retesting.” - Simplicity: “The less there is to test, the more quickly we can test it.” - Stability: “The fewer the changes, the fewer the disruptions to testing.” - Understandability:”The more information we have, the smarter we will test.”
Test Case Design Two general software testing approaches: Black-Box Testing and White-Box Testing Black-box testing: knowing the specific functions of a software, design tests to demonstrate each function and check its errors. Major focus:  functions, operations, external interfaces, external data and information White-box testing: knowing the internals of a software,  design tests to exercise all internals of a software to make sure  they operates according to specifications and designs Major focus: internal structures, logic paths, control flows, data flows   internal data structures, conditions, loops, etc.
White-Box Testing and Basis Path Testing White-box testing, also known as glass-box testing. It is a test case design method that uses the control structure of the procedural design to derive test cases. Using white-box testing methods, we derive test cases that - Guarantee that all independent paths within a module have been exercised at  least once. - Exercise all logical decisions one their true and false sides. - Execute all loops at their boundaries and within their operational bounds. - Exercise internal data structures to assure their validity. Basic path testing (a white-box testing technique):   - First proposed by TomMcCabe [MCC76]. - Can be used to derive a logical complexity measure for a procedure design. - Used as a guide for defining a basis set of execution path. - Guarantee to execute every statement in the program at least one time.
Cyclomatic Complexity Cyclomatic complexity is a software metric -> provides a quantitative measure of the global complexity of a program. When this metric is used in the context of the basis path testing, the value computed for cyclomatic complexity defines the number of independent paths in the basis set of a program. Three ways to compute cyclomatic complexity: - The number of regions of the flow graph correspond to the cyclomatic complexity. - Cyclomatic complexity, V(G), for a flow graph G is defined as V(G) = E - N +2 where E is the number of flow graph edges and N is the number of flow graph nodes. - Cyclomatic complexity, V(G) = P + 1 where P is the number of predicate nodes contained in the flow graph G.
Deriving Test Cases Step 1 :  Using the design or code as a foundation, draw a corresponding flow  graph. Step 2:  Determine the cyclomatic complexity of the resultant flow graph. Step 3:  Determine a basis set of linearly independent paths. For example,  path 1: 1-2-10-11-13 path 2: 1-2-10-12-13 path 3: 1-2-3-10-11-13 path 4: 1-2-3-4-5-8-9-2-… path 5: 1-2-3-4-5-6-8-9-2-.. Path 6: 1-2-3-4-5-6-7-8-9-2-.. Step 4: Prepare test cases that will force execution of each path in the basis  set. Path 1: test case: value (k) = valid input, where k < i defined below. value (i) = -999, where 2 <= I <= 100 expected results: correct average based on k values and proper totals.
Equivalence Partitioning Equivalence partitioning  is a black-box testing method - divide the input domain of a program into classes of data - derive test cases based on these partitions. Test case design for equivalence partitioning is based on an evaluation of equivalence classes for an input domain. An  equivalence class  represents a set of valid or invalid states for input condition.  An  input condition  is: - a specific numeric value, a range of values - a set of related values, or a Boolean condition system Valid inputs invalid inputs outputs partition
Equivalence Classes Equivalence classes can be defined using the following guidelines: - If an input condition specifies a range, one valid and two invalid equivalence  class are defined. - If an input condition requires a specific value, one valid and two invalid  equivalence classes are defined. - If an input condition specifies a member of a set, one valid and one invalid  equivalence classes are defined. - If an input condition is Boolean, one valid and one invalid classes are  defined. Examples: area code: input condition, Boolean - the area code may or may not be present. input condition, range  - value defined between 200 and 900 password: input condition, Boolean - a password nay or may not be present. input condition, value - six character string. command: input condition, set - containing commands noted before.
Boundary Value Analysis Boundary value analysis(BVA )  - a test case design technique - complements to equivalence partition Objective: Boundary value analysis leads to a selection of test cases that exercise bounding values. Guidelines: - If an input condition specifies a range bounded by values a and b, test cases should be designed with value a and b, just above and below a and b. Example: Integer D with input condition [-3, 10],  test values: -3, 10, 11, -2, 0 - If an input condition specifies a number values, test cases should be developed to exercise the minimum and maximum numbers. Values just above and below minimum and maximum are also tested. Example: Enumerate data E with input condition: {3, 5, 100, 102} test values: 3, 102, -1, 200, 5
Boundary Value Analysis - Guidelines 1 and 2 are applied to output condition. - If internal program data structures have prescribed boundaries, be certain to design a test case to exercise the data structure at its boundary Such as data structures: - array input condition: empty, single element, full element, out-of-boundary search for element: - element is inside array or the element is not inside array You can think about other data structures: - list, set, stack, queue, and tree
Ad

More Related Content

What's hot (20)

Testing methodology
Testing methodologyTesting methodology
Testing methodology
Dina Hanbazazah
 
Regression testing
Regression testingRegression testing
Regression testing
Mohua Amin
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-concepts
medsherb
 
Software Verification & Validation
Software Verification & ValidationSoftware Verification & Validation
Software Verification & Validation
university of education,Lahore
 
Software Testing
Software TestingSoftware Testing
Software Testing
Mousmi Pawar
 
Integration testing
Integration testingIntegration testing
Integration testing
queen jemila
 
Interview questions for manual testing technology.
Interview questions for manual testing technology.Interview questions for manual testing technology.
Interview questions for manual testing technology.
Vinay Agnihotri
 
Agile Testing and Test Automation
Agile Testing and Test AutomationAgile Testing and Test Automation
Agile Testing and Test Automation
Naveen Kumar Singh
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and types
Confiz
 
functional testing
functional testing functional testing
functional testing
bharathanche
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
Archana Krushnan
 
Software process and project metrics
Software process and project metricsSoftware process and project metrics
Software process and project metrics
Indu Sharma Bhardwaj
 
Software testing
Software testingSoftware testing
Software testing
balamurugan.k Kalibalamurugan
 
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
Edureka!
 
Unit Testing vs Integration Testing
Unit Testing vs Integration TestingUnit Testing vs Integration Testing
Unit Testing vs Integration Testing
Rock Interview
 
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Ankit Prajapati
 
Presentation On Software Testing Bug Life Cycle
Presentation On Software Testing Bug Life CyclePresentation On Software Testing Bug Life Cycle
Presentation On Software Testing Bug Life Cycle
Rajon
 
What Is Functional Testing?
What Is Functional Testing?What Is Functional Testing?
What Is Functional Testing?
QA InfoTech
 
Sanity testing and smoke testing
Sanity testing and smoke testingSanity testing and smoke testing
Sanity testing and smoke testing
MUHAMMAD FARHAN ASLAM
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
Joe Wilson
 
Regression testing
Regression testingRegression testing
Regression testing
Mohua Amin
 
Basic software-testing-concepts
Basic software-testing-conceptsBasic software-testing-concepts
Basic software-testing-concepts
medsherb
 
Integration testing
Integration testingIntegration testing
Integration testing
queen jemila
 
Interview questions for manual testing technology.
Interview questions for manual testing technology.Interview questions for manual testing technology.
Interview questions for manual testing technology.
Vinay Agnihotri
 
Agile Testing and Test Automation
Agile Testing and Test AutomationAgile Testing and Test Automation
Agile Testing and Test Automation
Naveen Kumar Singh
 
Software testing methods, levels and types
Software testing methods, levels and typesSoftware testing methods, levels and types
Software testing methods, levels and types
Confiz
 
functional testing
functional testing functional testing
functional testing
bharathanche
 
Introduction to Automation Testing
Introduction to Automation TestingIntroduction to Automation Testing
Introduction to Automation Testing
Archana Krushnan
 
Software process and project metrics
Software process and project metricsSoftware process and project metrics
Software process and project metrics
Indu Sharma Bhardwaj
 
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
Edureka!
 
Unit Testing vs Integration Testing
Unit Testing vs Integration TestingUnit Testing vs Integration Testing
Unit Testing vs Integration Testing
Rock Interview
 
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Software Testing - Part 1 (Techniques, Types, Levels, Methods, STLC, Bug Life...
Ankit Prajapati
 
Presentation On Software Testing Bug Life Cycle
Presentation On Software Testing Bug Life CyclePresentation On Software Testing Bug Life Cycle
Presentation On Software Testing Bug Life Cycle
Rajon
 
What Is Functional Testing?
What Is Functional Testing?What Is Functional Testing?
What Is Functional Testing?
QA InfoTech
 
Unit Testing And Mocking
Unit Testing And MockingUnit Testing And Mocking
Unit Testing And Mocking
Joe Wilson
 

Viewers also liked (12)

Testing techniques
Testing techniquesTesting techniques
Testing techniques
RaginiRohatgi
 
Techniques in black box testing
Techniques in black box testingTechniques in black box testing
Techniques in black box testing
Duy Tan Geek
 
Static testing vs dynamic testing
Static testing vs dynamic testingStatic testing vs dynamic testing
Static testing vs dynamic testing
pooja deshmukh
 
White box ppt
White box pptWhite box ppt
White box ppt
Chintakunta Hariteja
 
Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic Testing
Hoang Nguyen
 
Black box
Black boxBlack box
Black box
fadysid03
 
Black box testing lecture 11
Black box testing lecture 11Black box testing lecture 11
Black box testing lecture 11
Abdul Basit
 
Cause effect graphing technique
Cause effect graphing techniqueCause effect graphing technique
Cause effect graphing technique
Ankush Kumar
 
Black box & white-box testing technique
Black box & white-box testing techniqueBlack box & white-box testing technique
Black box & white-box testing technique
SivaprasanthRentala1975
 
Types of Software Testing
Types of Software TestingTypes of Software Testing
Types of Software Testing
Nishant Worah
 
Black & White Box testing
Black & White Box testingBlack & White Box testing
Black & White Box testing
Mohamed Zeinelabdeen Abdelgader Farh jber
 
Whitebox testing
Whitebox testingWhitebox testing
Whitebox testing
Oana Feidi
 
Ad

Similar to Software Testing Techniques (20)

CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4
SIMONTHOMAS S
 
Testing
TestingTesting
Testing
Sonali Chauhan
 
Testing
TestingTesting
Testing
Mohammed
 
Test Levels & Techniques
Test Levels & TechniquesTest Levels & Techniques
Test Levels & Techniques
Dhanasekaran Nagarajan
 
Chapter 8 Testing Tactics.ppt Software engineering
Chapter 8 Testing Tactics.ppt Software engineeringChapter 8 Testing Tactics.ppt Software engineering
Chapter 8 Testing Tactics.ppt Software engineering
AnasHassan52
 
Chapter 8 Testing Tactics.ppt
Chapter 8 Testing Tactics.pptChapter 8 Testing Tactics.ppt
Chapter 8 Testing Tactics.ppt
VijayaPratapReddyM
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)
ShudipPal
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)
ShudipPal
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblb
jeyasrig
 
Class9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfClass9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdf
FarjanaParvin5
 
11 whiteboxtesting
11 whiteboxtesting11 whiteboxtesting
11 whiteboxtesting
asifusman1998
 
1414_lecturueueueueuueueeueueueuusuee_7.ppt
1414_lecturueueueueuueueeueueueuusuee_7.ppt1414_lecturueueueueuueueeueueueuusuee_7.ppt
1414_lecturueueueueuueueeueueueuusuee_7.ppt
abdulbasetalselwi
 
Test Case Design & Technique
Test Case Design & TechniqueTest Case Design & Technique
Test Case Design & Technique
Rajesh-QA
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
Sachin-QA
 
Test Case Design
Test Case DesignTest Case Design
Test Case Design
Vidya-QA
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
ANKUR-BA
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
Fayis-QA
 
Qat09 presentations dxw07u
Qat09 presentations dxw07uQat09 presentations dxw07u
Qat09 presentations dxw07u
Shubham Sharma
 
Software engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit designSoftware engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit design
Maitree Patel
 
Blackbox
BlackboxBlackbox
Blackbox
GuruKrishnaTeja
 
CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4
SIMONTHOMAS S
 
Chapter 8 Testing Tactics.ppt Software engineering
Chapter 8 Testing Tactics.ppt Software engineeringChapter 8 Testing Tactics.ppt Software engineering
Chapter 8 Testing Tactics.ppt Software engineering
AnasHassan52
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)
ShudipPal
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)
ShudipPal
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblb
jeyasrig
 
Class9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfClass9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdf
FarjanaParvin5
 
1414_lecturueueueueuueueeueueueuusuee_7.ppt
1414_lecturueueueueuueueeueueueuusuee_7.ppt1414_lecturueueueueuueueeueueueuusuee_7.ppt
1414_lecturueueueueuueueeueueueuusuee_7.ppt
abdulbasetalselwi
 
Test Case Design & Technique
Test Case Design & TechniqueTest Case Design & Technique
Test Case Design & Technique
Rajesh-QA
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
Sachin-QA
 
Test Case Design
Test Case DesignTest Case Design
Test Case Design
Vidya-QA
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
ANKUR-BA
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
Fayis-QA
 
Qat09 presentations dxw07u
Qat09 presentations dxw07uQat09 presentations dxw07u
Qat09 presentations dxw07u
Shubham Sharma
 
Software engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit designSoftware engineering Testing technique,test case,test suit design
Software engineering Testing technique,test case,test suit design
Maitree Patel
 
Ad

More from Kiran Kumar (12)

User Interface Standards
User Interface StandardsUser Interface Standards
User Interface Standards
Kiran Kumar
 
Banking Overview
Banking OverviewBanking Overview
Banking Overview
Kiran Kumar
 
Winrunner Vs QTP
Winrunner Vs QTPWinrunner Vs QTP
Winrunner Vs QTP
Kiran Kumar
 
Security Testing
Security TestingSecurity Testing
Security Testing
Kiran Kumar
 
Software Testing
Software TestingSoftware Testing
Software Testing
Kiran Kumar
 
Software Testing
Software TestingSoftware Testing
Software Testing
Kiran Kumar
 
Software Testing
Software TestingSoftware Testing
Software Testing
Kiran Kumar
 
Testing
TestingTesting
Testing
Kiran Kumar
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing Techniques
Kiran Kumar
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing Fundamentals
Kiran Kumar
 
Quality Assurance
Quality AssuranceQuality Assurance
Quality Assurance
Kiran Kumar
 
Software Quality Testing
Software Quality TestingSoftware Quality Testing
Software Quality Testing
Kiran Kumar
 
User Interface Standards
User Interface StandardsUser Interface Standards
User Interface Standards
Kiran Kumar
 
Banking Overview
Banking OverviewBanking Overview
Banking Overview
Kiran Kumar
 
Winrunner Vs QTP
Winrunner Vs QTPWinrunner Vs QTP
Winrunner Vs QTP
Kiran Kumar
 
Security Testing
Security TestingSecurity Testing
Security Testing
Kiran Kumar
 
Software Testing
Software TestingSoftware Testing
Software Testing
Kiran Kumar
 
Software Testing
Software TestingSoftware Testing
Software Testing
Kiran Kumar
 
Software Testing
Software TestingSoftware Testing
Software Testing
Kiran Kumar
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing Techniques
Kiran Kumar
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing Fundamentals
Kiran Kumar
 
Quality Assurance
Quality AssuranceQuality Assurance
Quality Assurance
Kiran Kumar
 
Software Quality Testing
Software Quality TestingSoftware Quality Testing
Software Quality Testing
Kiran Kumar
 

Recently uploaded (20)

Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025
Damco Salesforce Services
 
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
UXPA Boston
 
ICDCC 2025: Securing Agentic AI - Eryk Budi Pratama.pdf
ICDCC 2025: Securing Agentic AI - Eryk Budi Pratama.pdfICDCC 2025: Securing Agentic AI - Eryk Budi Pratama.pdf
ICDCC 2025: Securing Agentic AI - Eryk Budi Pratama.pdf
Eryk Budi Pratama
 
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Gary Arora
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More MachinesRefactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Leon Anavi
 
Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)
Kaya Weers
 
Best 10 Free AI Character Chat Platforms
Best 10 Free AI Character Chat PlatformsBest 10 Free AI Character Chat Platforms
Best 10 Free AI Character Chat Platforms
Soulmaite
 
Top Hyper-Casual Game Studio Services
Top  Hyper-Casual  Game  Studio ServicesTop  Hyper-Casual  Game  Studio Services
Top Hyper-Casual Game Studio Services
Nova Carter
 
Secondary Storage for a microcontroller system
Secondary Storage for a microcontroller systemSecondary Storage for a microcontroller system
Secondary Storage for a microcontroller system
fizarcse
 
Understanding SEO in the Age of AI.pdf
Understanding SEO in the Age of AI.pdfUnderstanding SEO in the Age of AI.pdf
Understanding SEO in the Age of AI.pdf
Fulcrum Concepts, LLC
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdf
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdfGoogle DeepMind’s New AI Coding Agent AlphaEvolve.pdf
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdf
derrickjswork
 
Who's choice? Making decisions with and about Artificial Intelligence, Keele ...
Who's choice? Making decisions with and about Artificial Intelligence, Keele ...Who's choice? Making decisions with and about Artificial Intelligence, Keele ...
Who's choice? Making decisions with and about Artificial Intelligence, Keele ...
Alan Dix
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
ICT Frame Magazine Pvt. Ltd.
 
Building a research repository that works by Clare Cady
Building a research repository that works by Clare CadyBuilding a research repository that works by Clare Cady
Building a research repository that works by Clare Cady
UXPA Boston
 
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 
Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025Top 5 Qualities to Look for in Salesforce Partners in 2025
Top 5 Qualities to Look for in Salesforce Partners in 2025
Damco Salesforce Services
 
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
Longitudinal Benchmark: A Real-World UX Case Study in Onboarding by Linda Bor...
UXPA Boston
 
ICDCC 2025: Securing Agentic AI - Eryk Budi Pratama.pdf
ICDCC 2025: Securing Agentic AI - Eryk Budi Pratama.pdfICDCC 2025: Securing Agentic AI - Eryk Budi Pratama.pdf
ICDCC 2025: Securing Agentic AI - Eryk Budi Pratama.pdf
Eryk Budi Pratama
 
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Harmonizing Multi-Agent Intelligence | Open Data Science Conference | Gary Ar...
Gary Arora
 
May Patch Tuesday
May Patch TuesdayMay Patch Tuesday
May Patch Tuesday
Ivanti
 
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdfKit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Kit-Works Team Study_팀스터디_김한솔_nuqs_20250509.pdf
Wonjun Hwang
 
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More MachinesRefactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Refactoring meta-rauc-community: Cleaner Code, Better Maintenance, More Machines
Leon Anavi
 
Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)Design pattern talk by Kaya Weers - 2025 (v2)
Design pattern talk by Kaya Weers - 2025 (v2)
Kaya Weers
 
Best 10 Free AI Character Chat Platforms
Best 10 Free AI Character Chat PlatformsBest 10 Free AI Character Chat Platforms
Best 10 Free AI Character Chat Platforms
Soulmaite
 
Top Hyper-Casual Game Studio Services
Top  Hyper-Casual  Game  Studio ServicesTop  Hyper-Casual  Game  Studio Services
Top Hyper-Casual Game Studio Services
Nova Carter
 
Secondary Storage for a microcontroller system
Secondary Storage for a microcontroller systemSecondary Storage for a microcontroller system
Secondary Storage for a microcontroller system
fizarcse
 
Understanding SEO in the Age of AI.pdf
Understanding SEO in the Age of AI.pdfUnderstanding SEO in the Age of AI.pdf
Understanding SEO in the Age of AI.pdf
Fulcrum Concepts, LLC
 
machines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdfmachines-for-woodworking-shops-en-compressed.pdf
machines-for-woodworking-shops-en-compressed.pdf
AmirStern2
 
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdf
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdfGoogle DeepMind’s New AI Coding Agent AlphaEvolve.pdf
Google DeepMind’s New AI Coding Agent AlphaEvolve.pdf
derrickjswork
 
Who's choice? Making decisions with and about Artificial Intelligence, Keele ...
Who's choice? Making decisions with and about Artificial Intelligence, Keele ...Who's choice? Making decisions with and about Artificial Intelligence, Keele ...
Who's choice? Making decisions with and about Artificial Intelligence, Keele ...
Alan Dix
 
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Kit-Works Team Study_아직도 Dockefile.pdf_김성호
Wonjun Hwang
 
Building the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdfBuilding the Customer Identity Community, Together.pdf
Building the Customer Identity Community, Together.pdf
Cheryl Hung
 
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
MULTI-STAKEHOLDER CONSULTATION PROGRAM On Implementation of DNF 2.0 and Way F...
ICT Frame Magazine Pvt. Ltd.
 
Building a research repository that works by Clare Cady
Building a research repository that works by Clare CadyBuilding a research repository that works by Clare Cady
Building a research repository that works by Clare Cady
UXPA Boston
 
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptxDevOpsDays SLC - Platform Engineers are Product Managers.pptx
DevOpsDays SLC - Platform Engineers are Product Managers.pptx
Justin Reock
 

Software Testing Techniques

  • 1. Software Testing Techniques Instructor: Dr. Jerry Gao
  • 2. Software Testing Techniques Jerry Gao, Ph.D. Jan. 1999 - Software Testing Fundamentals - Testing Objectives, Principles, Testability - Software Test Case Design - White-Box Testing - Cyclomatic Complexity - Graph Matrices - Control Structuring Testing (not included) - Condition Testing (not included) - Data Flow Testing (not included) - Loop Testing (not included) - Black-Box Testing - Graph-based Testing Methods (not included) - Equivalence Partitioning - Boundary Value Analysis - Comparison Testing (not included)
  • 3. Software Testing Fundamentals Software testing is a critical element of software quality assurance and represents the ultimate review of specification, design, and coding. Software testing demonstrates that software function appear to be working according to specifications and performance requirements. Testing Objectives: Myers [MYE79] states a number of rules that can serve well as testing objectives: - Testing is a process of executing a program with the intent of finding an error. - A good test case is one that has high probability of finding an undiscovered error. - A successful test is one that uncovers an as-yet undiscovered error. The major testing objective is to design tests that systematically uncover types of errors with minimum time and effort.
  • 4. Software Testing Principles Davids [DAV95] suggests a set of testing principles: - All tests should be traceable to customer requirements. - Tests should be planned long before testing begins. - The Pareto principle applies to software testing. - 80% of all errors uncovered during testing will likely be traceable to 20% of all program modules. - Testing should begin “in the small” and progress toward testing “in the large”. - Exhaustive testing is not possible. - To be most effective, testing should be conducted by an independent third party.
  • 5. Software Testability According to James Bach: Software testability is simply how easily a computer program can be tested. A set of program characteristics that lead to testable software: - Operability: “the better it works, the more efficiently it can be tested.” - Observability: “What you see is what you test.” - Controllability: “The better we can control the software, the more the testing can be automated and optimized.” - Decomposability: “By controlling the scope of testing, we can more quickly isolate problems and perform smarter retesting.” - Simplicity: “The less there is to test, the more quickly we can test it.” - Stability: “The fewer the changes, the fewer the disruptions to testing.” - Understandability:”The more information we have, the smarter we will test.”
  • 6. Test Case Design Two general software testing approaches: Black-Box Testing and White-Box Testing Black-box testing: knowing the specific functions of a software, design tests to demonstrate each function and check its errors. Major focus: functions, operations, external interfaces, external data and information White-box testing: knowing the internals of a software, design tests to exercise all internals of a software to make sure they operates according to specifications and designs Major focus: internal structures, logic paths, control flows, data flows internal data structures, conditions, loops, etc.
  • 7. White-Box Testing and Basis Path Testing White-box testing, also known as glass-box testing. It is a test case design method that uses the control structure of the procedural design to derive test cases. Using white-box testing methods, we derive test cases that - Guarantee that all independent paths within a module have been exercised at least once. - Exercise all logical decisions one their true and false sides. - Execute all loops at their boundaries and within their operational bounds. - Exercise internal data structures to assure their validity. Basic path testing (a white-box testing technique): - First proposed by TomMcCabe [MCC76]. - Can be used to derive a logical complexity measure for a procedure design. - Used as a guide for defining a basis set of execution path. - Guarantee to execute every statement in the program at least one time.
  • 8. Cyclomatic Complexity Cyclomatic complexity is a software metric -> provides a quantitative measure of the global complexity of a program. When this metric is used in the context of the basis path testing, the value computed for cyclomatic complexity defines the number of independent paths in the basis set of a program. Three ways to compute cyclomatic complexity: - The number of regions of the flow graph correspond to the cyclomatic complexity. - Cyclomatic complexity, V(G), for a flow graph G is defined as V(G) = E - N +2 where E is the number of flow graph edges and N is the number of flow graph nodes. - Cyclomatic complexity, V(G) = P + 1 where P is the number of predicate nodes contained in the flow graph G.
  • 9. Deriving Test Cases Step 1 : Using the design or code as a foundation, draw a corresponding flow graph. Step 2: Determine the cyclomatic complexity of the resultant flow graph. Step 3: Determine a basis set of linearly independent paths. For example, path 1: 1-2-10-11-13 path 2: 1-2-10-12-13 path 3: 1-2-3-10-11-13 path 4: 1-2-3-4-5-8-9-2-… path 5: 1-2-3-4-5-6-8-9-2-.. Path 6: 1-2-3-4-5-6-7-8-9-2-.. Step 4: Prepare test cases that will force execution of each path in the basis set. Path 1: test case: value (k) = valid input, where k < i defined below. value (i) = -999, where 2 <= I <= 100 expected results: correct average based on k values and proper totals.
  • 10. Equivalence Partitioning Equivalence partitioning is a black-box testing method - divide the input domain of a program into classes of data - derive test cases based on these partitions. Test case design for equivalence partitioning is based on an evaluation of equivalence classes for an input domain. An equivalence class represents a set of valid or invalid states for input condition. An input condition is: - a specific numeric value, a range of values - a set of related values, or a Boolean condition system Valid inputs invalid inputs outputs partition
  • 11. Equivalence Classes Equivalence classes can be defined using the following guidelines: - If an input condition specifies a range, one valid and two invalid equivalence class are defined. - If an input condition requires a specific value, one valid and two invalid equivalence classes are defined. - If an input condition specifies a member of a set, one valid and one invalid equivalence classes are defined. - If an input condition is Boolean, one valid and one invalid classes are defined. Examples: area code: input condition, Boolean - the area code may or may not be present. input condition, range - value defined between 200 and 900 password: input condition, Boolean - a password nay or may not be present. input condition, value - six character string. command: input condition, set - containing commands noted before.
  • 12. Boundary Value Analysis Boundary value analysis(BVA ) - a test case design technique - complements to equivalence partition Objective: Boundary value analysis leads to a selection of test cases that exercise bounding values. Guidelines: - If an input condition specifies a range bounded by values a and b, test cases should be designed with value a and b, just above and below a and b. Example: Integer D with input condition [-3, 10], test values: -3, 10, 11, -2, 0 - If an input condition specifies a number values, test cases should be developed to exercise the minimum and maximum numbers. Values just above and below minimum and maximum are also tested. Example: Enumerate data E with input condition: {3, 5, 100, 102} test values: 3, 102, -1, 200, 5
  • 13. Boundary Value Analysis - Guidelines 1 and 2 are applied to output condition. - If internal program data structures have prescribed boundaries, be certain to design a test case to exercise the data structure at its boundary Such as data structures: - array input condition: empty, single element, full element, out-of-boundary search for element: - element is inside array or the element is not inside array You can think about other data structures: - list, set, stack, queue, and tree
  翻译: