SlideShare a Scribd company logo
1 of 13
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

More Related Content

What's hot

Fundamentals of Software Testing
Fundamentals of Software TestingFundamentals of Software Testing
Fundamentals of Software TestingSagar Joshi
 
Software Testing 101
Software Testing 101Software Testing 101
Software Testing 101QA Hannah
 
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
 
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1Raghu Kiran
 
Non Functional Testing
Non Functional TestingNon Functional Testing
Non Functional TestingNishant Worah
 
Software testing
Software testingSoftware testing
Software testingmkn3009
 
Software Testing
Software TestingSoftware Testing
Software TestingSengu Msc
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts pptRathna Priya
 
Software Testing Life Cycle – A Beginner’s Guide
Software Testing Life Cycle – A Beginner’s GuideSoftware Testing Life Cycle – A Beginner’s Guide
Software Testing Life Cycle – A Beginner’s GuideSyed Hassan Raza
 
Software Testing Process
Software Testing ProcessSoftware Testing Process
Software Testing Processguest1f2740
 
Software Testing Technique in Software Engineering
Software Testing Technique in Software EngineeringSoftware Testing Technique in Software Engineering
Software Testing Technique in Software EngineeringIsmail Hussain
 

What's hot (20)

Fundamentals of Software Testing
Fundamentals of Software TestingFundamentals of Software Testing
Fundamentals of Software Testing
 
Testing fundamentals
Testing fundamentalsTesting fundamentals
Testing fundamentals
 
Software testing
Software testingSoftware testing
Software testing
 
Software Testing 101
Software Testing 101Software Testing 101
Software Testing 101
 
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...
 
Manual testing concepts course 1
Manual testing concepts course 1Manual testing concepts course 1
Manual testing concepts course 1
 
Non Functional Testing
Non Functional TestingNon Functional Testing
Non Functional Testing
 
Testing
TestingTesting
Testing
 
Types of testing
Types of testingTypes of testing
Types of testing
 
Software testing
Software testingSoftware testing
Software testing
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts ppt
 
Software Testing Life Cycle – A Beginner’s Guide
Software Testing Life Cycle – A Beginner’s GuideSoftware Testing Life Cycle – A Beginner’s Guide
Software Testing Life Cycle – A Beginner’s Guide
 
Test cases
Test casesTest cases
Test cases
 
Sanity testing and smoke testing
Sanity testing and smoke testingSanity testing and smoke testing
Sanity testing and smoke testing
 
Software Testing Process
Software Testing ProcessSoftware Testing Process
Software Testing Process
 
Software testing
Software testingSoftware testing
Software testing
 
Software Testing Technique in Software Engineering
Software Testing Technique in Software EngineeringSoftware Testing Technique in Software Engineering
Software Testing Technique in Software Engineering
 
SOFTWARE TESTING
SOFTWARE TESTINGSOFTWARE TESTING
SOFTWARE TESTING
 
Software Testing or Quality Assurance
Software Testing or Quality AssuranceSoftware Testing or Quality Assurance
Software Testing or Quality Assurance
 

Viewers also liked

Viewers also liked (11)

Testing techniques
Testing techniquesTesting techniques
Testing techniques
 
Techniques in black box testing
Techniques in black box testingTechniques in black box testing
Techniques in black box testing
 
Static testing vs dynamic testing
Static testing vs dynamic testingStatic testing vs dynamic testing
Static testing vs dynamic testing
 
White box ppt
White box pptWhite box ppt
White box ppt
 
Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic Testing
 
Black box
Black boxBlack box
Black box
 
Black box testing lecture 11
Black box testing lecture 11Black box testing lecture 11
Black box testing lecture 11
 
Cause effect graphing technique
Cause effect graphing techniqueCause effect graphing technique
Cause effect graphing technique
 
Black box & white-box testing technique
Black box & white-box testing techniqueBlack box & white-box testing technique
Black box & white-box testing technique
 
Black & White Box testing
Black & White Box testingBlack & White Box testing
Black & White Box testing
 
Whitebox testing
Whitebox testingWhitebox testing
Whitebox testing
 

Similar to Software Testing Techniques

CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4CS8494 SOFTWARE ENGINEERING Unit-4
CS8494 SOFTWARE ENGINEERING Unit-4SIMONTHOMAS 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 engineeringAnasHassan52
 
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/fknblbjeyasrig
 
Class9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfClass9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfFarjanaParvin5
 
1414_lecturueueueueuueueeueueueuusuee_7.ppt
1414_lecturueueueueuueueeueueueuusuee_7.ppt1414_lecturueueueueuueueeueueueuusuee_7.ppt
1414_lecturueueueueuueueeueueueuusuee_7.pptabdulbasetalselwi
 
Test Case Design
Test Case DesignTest Case Design
Test Case DesignVidya-QA
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and TechniqueFayis-QA
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and TechniqueANKUR-BA
 
Test Case Design & Technique
Test Case Design & TechniqueTest Case Design & Technique
Test Case Design & TechniqueRajesh-QA
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and TechniqueSachin-QA
 
Qat09 presentations dxw07u
Qat09 presentations dxw07uQat09 presentations dxw07u
Qat09 presentations dxw07uShubham 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 designMaitree Patel
 

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
 
Testing
TestingTesting
Testing
 
Test Levels & Techniques
Test Levels & TechniquesTest Levels & Techniques
Test Levels & Techniques
 
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
 
Chapter 8 Testing Tactics.ppt
Chapter 8 Testing Tactics.pptChapter 8 Testing Tactics.ppt
Chapter 8 Testing Tactics.ppt
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)
 
Software Engineering (Testing techniques)
Software Engineering (Testing techniques)Software Engineering (Testing techniques)
Software Engineering (Testing techniques)
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblb
 
Class9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfClass9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdf
 
11 whiteboxtesting
11 whiteboxtesting11 whiteboxtesting
11 whiteboxtesting
 
1414_lecturueueueueuueueeueueueuusuee_7.ppt
1414_lecturueueueueuueueeueueueuusuee_7.ppt1414_lecturueueueueuueueeueueueuusuee_7.ppt
1414_lecturueueueueuueueeueueueuusuee_7.ppt
 
Test Case Design
Test Case DesignTest Case Design
Test Case Design
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
 
Test Case Design & Technique
Test Case Design & TechniqueTest Case Design & Technique
Test Case Design & Technique
 
Test Case Design and Technique
Test Case Design and TechniqueTest Case Design and Technique
Test Case Design and Technique
 
Qat09 presentations dxw07u
Qat09 presentations dxw07uQat09 presentations dxw07u
Qat09 presentations dxw07u
 
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
 
Blackbox
BlackboxBlackbox
Blackbox
 
Gd test kieu_test
Gd test kieu_testGd test kieu_test
Gd test kieu_test
 

More from Kiran Kumar

User Interface Standards
User Interface StandardsUser Interface Standards
User Interface StandardsKiran Kumar
 
Banking Overview
Banking OverviewBanking Overview
Banking OverviewKiran Kumar
 
Winrunner Vs QTP
Winrunner Vs QTPWinrunner Vs QTP
Winrunner Vs QTPKiran Kumar
 
Security Testing
Security TestingSecurity Testing
Security TestingKiran Kumar
 
Software Testing
Software TestingSoftware Testing
Software TestingKiran Kumar
 
Software Testing
Software TestingSoftware Testing
Software TestingKiran Kumar
 
Software Testing
Software TestingSoftware Testing
Software TestingKiran Kumar
 
Software Testing Techniques
Software Testing TechniquesSoftware Testing Techniques
Software Testing TechniquesKiran Kumar
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing FundamentalsKiran Kumar
 
Quality Assurance
Quality AssuranceQuality Assurance
Quality AssuranceKiran Kumar
 
Software Quality Testing
Software Quality TestingSoftware Quality Testing
Software Quality TestingKiran Kumar
 

More from Kiran Kumar (12)

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

Recently uploaded

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Recently uploaded (20)

Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

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