SlideShare uma empresa Scribd logo
1 de 28
Finding the Defects that Matter
Contents Objective 1 Black Box Testing Technique 2 White Box Testing Techniques 3 Grey Box Testing Techniques 4 Never Ending Techniques 5
Objective Rules are SIMPLE , but Walking the WALK is not The objective of this presentation is to understand the various testing techniques so that we can use them effectively
Testing Techniques
Black-Box Testing Main focus is on functionality of the system as a whole ,[object Object],[object Object],[object Object],[object Object]
Black-Box Testing Techniques A technique for testing equivalence classes rather than undertaking exhaustive testing of each value of the larger class. A technique that consists of developing test cases and data that focus on the input and output boundaries of a given function. “ A race occurs when two threads can access (read or write) a data variable simultaneously and  at least one of the two accesses is a write .” Error Guessing is the art of guessing where errors can be hidden.
Equivalence Partitioning Range: Valid Class:1 Invalid Class:2 Specific Value Valid Class:1 Invalid Class:2 Login page , user field can accept 6 to 55 character Valid Class :-  6 ≤ USR ≥ 55 Invalid Class:  USR < 6 Invalid Class:  USR > 55 If specifications state that a maximum of 4 online books can be registered against anyone session thru instructor.  Valid Class:  1 ≤ No. of online books ≥ 4 Invalid Class:   No. of online books > 4  Invalid Class:   No. of online books < 1
Equivalence Partitioning cont… Member of Sets Valid Class:1 Invalid Class:1 Boolean Valid Class:1 Invalid Class:1 If a discount code must be input as P for preferred customer, R for standard reduced rate, or N for none, and if each case is treated differently. Valid class  = P, R, N Invalid class  code is not one of P, R, N  If checkbox is checked or unchecked.  Checked/ Unchecked Either True / False Or Yes / No
Boundary Value Analysis Extreme Ends of the Range Six Boundary Value ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Just Beyond the Ends Just Before the Ends
Race Condition What occurs when a number of programs rely on certain timing conditions. A Program can only execute and carry out its task when a second program has completed. If the first program tries to execute before the second program has completed then anomalous results occur.  Almost invariably race conditions give rise to anomalous behavior.
Error Guessing Process of making an educated guess as to other types of areas to be tested . Intuition Experience The program reads a file. What happens if the program gets an empty file or the file does not exists? Tester would create test cases for those conditions.
White-Box Testing Design test cases to exercise as many paths through the code as possible White box testing focuses on the internals of the systems.
White Box Testing Techniques Statement Coverage requires that each statement will have been executed at least once. Simplest form of logic coverage. Also known as  Node Coverage. Path Coverage requires that all program paths will have been traversed at least once. Condition Coverage requires that each condition will have been True at least once and False at least once. In this white box testing technique we try to identify how many program functions are covered by test cases. So, while providing function coverage, test cases can be written so as to exercise each of different functions in the code.
Statement Coverage Example   i = 0 ; if (code = = &quot;y&quot;) { statement –1 ;  statement –2 ; : : statement - n ; } else result = {marks / I} * 100 ; In this program, when we test with code = &quot;y&quot;, we will get 80% code coverage. But if the data distribution in the real world is such that 90% of the time, the value of code is not = &quot;y&quot;, then, the program will fail 90% of the time because of the exception-divide by zero. Thus. even with a code coverage of 80%, we are left with a defect that hits the users 90% of the time.  The path coverage technique described below overcomes this problem.
Cyclomatic Complexity Step – 1: Start writing the following C – program # include <stdio.h> # include <conio.h> (1) int main ( ) (2) { (3) int a, b, c, boolean = 0; (4) printf (&quot; Enter side-a :&quot;); (5) scanf (&quot;%d&quot;, & a); (6) printf(&quot; Enter side-b :&quot;); (7) scanf (&quot;%d&quot;, & b); (8) printf (&quot; Enter side-c:&quot;); (9) scanf (‘'%d&quot;, & c); (10) if ((a > 0) && (a < - 100) && (b > 0) && (b < . 100) && (c > 0) && (c < =100)) { (11) if ((a + b) > c) && ((c + a) > b) && ((b + c) > a)) { (12) boolean = 1; (13) } (14) } (15) else { (16) boolean = -1;  (17) }
Cyclomatic Complexity cont…... (18) if (boolean = = 1) { (19) if ((a = =b) && (b = =c)) { (20) printf (&quot;Triangle is equilateral&quot;);  (21) } (22) else if ((a = =b) I I (b = = c) I I (c = = a)) { (23) print (&quot;Triangle is isosceles&quot;);  (24) } (25) else { (26) printf(&quot;Triangle is scalene”);  (27) } (28) } (29) else if (boolean = = 0) { (30) printf (&quot;Not a triangle&quot;);  (31) } (32) else (33) printf (&quot; invalid input range&quot;);  (34) } (35) getch ( );  (36) return -1;  (37) }
Cyclomatic Complexity cont…... Step – 2 Draw the following Flow Graph Step – 3:  Draw the following DD Path Graph
Cyclomatic Complexity cont…... Step – 4:  Calculation of Cyclomatic  Complexity V(G) by three methods
Cyclomatic Complexity cont…... Conclusion 1 Conclusion 2 Each of these paths consists of at least one new edge. Hence this basis set of paths is NOT unique.  Test cases should be designed for the independent path execution as identified above . Conclusion 3 We must execute these paths at least once in order to test  the program thoroughly.
Condition Coverage: This technique of condition coverage or predicate monitors whether every operand in a complex logical expression has taken on every True / False value. Obviously, this will mean more test cases and the number of test cases and the number of test cases will rise exponentially with the number of conditions and Boolean expressions. For example, in if-then-else, there are 2 2  or 4 possible True / False conditions. The condition coverage which indicates the percentage of conditions covered by a set of test cases, is defined by the following formula Condition Coverage = (Total Decisions Exercised) / (Total Number of Decisions in Program) x 100  Thus it becomes quite clear that this technique of condition coverage is much stronger criteria than path coverage, which in turn is a much stronger criteria than statement coverage.
Function Coverage: White box Testing Technique we try to identify how many program functions are covered by test cases. So, while providing function coverage, test cases can be written so as to exercise each of different functions in the code. ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Function Coverage cont…… Conclusion  Better code coverage is the result of better code  flow understanding and  writing effective test cases.  Code coverage up to 40-50% is usually achievable.  Code coverage of more than 80% requires enormous amount of effort and understanding of the code.
Gray Box Testing Technique
Gray Box Testing Technique cont.. Consider a hypothetical case wherein you have to test a web application. Functionality of this web application is very simple, you just need to enter your personal details like email and field of interest on the web form and submit this form . Server will get these details, and based on the field of interest pick some articles and mail it to the given email. Email validation is happening at the client side using Java Scripts.
Grey Box Testing Technique cont.. Server will  never  get invalid mail ID Server will  never  send mail to invalid ID  Server will  never  receive failure notification for this mail System is making following assumptions
Gray Box Testing Technique cont.. Due to any reason if Java Scripts are  disabled .  Server will get  invalid  mail ID  Server will  send  mail to invalid mail ID  Server will  receive  failure notification
Never Ending Testing Techniques --  Check it out… There are a large number of testing techniques in addition to the defined ones. Try the techniques which best suits your application.
Thank You

Mais conteúdo relacionado

Mais procurados

Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts pptRathna Priya
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testingHadi Fadlallah
 
Quality Assurance and Software Testing
Quality Assurance and Software TestingQuality Assurance and Software Testing
Quality Assurance and Software Testingpingkapil
 
INTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFL
INTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFLINTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFL
INTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFLRahul R Pandya
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual TestingDirecti Group
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4 Mohammad Faizan
 
Test case techniques
Test case techniquesTest case techniques
Test case techniquesPina Parmar
 
Software Testing Basics
Software Testing BasicsSoftware Testing Basics
Software Testing BasicsBelal Raslan
 
What is Integration Testing? | Edureka
What is Integration Testing? | EdurekaWhat is Integration Testing? | Edureka
What is Integration Testing? | EdurekaEdureka!
 
Software testing.ppt
Software testing.pptSoftware testing.ppt
Software testing.pptKomal Garg
 
Chapter 6 - Tool Support for Testing
Chapter 6 - Tool Support for TestingChapter 6 - Tool Support for Testing
Chapter 6 - Tool Support for TestingNeeraj Kumar Singh
 
Black box testing lecture 11
Black box testing lecture 11Black box testing lecture 11
Black box testing lecture 11Abdul Basit
 
Chapter 1 - Fundamentals of Testing
Chapter 1 - Fundamentals of TestingChapter 1 - Fundamentals of Testing
Chapter 1 - Fundamentals of TestingNeeraj Kumar Singh
 

Mais procurados (20)

Testing concepts ppt
Testing concepts pptTesting concepts ppt
Testing concepts ppt
 
Manual testing ppt
Manual testing pptManual testing ppt
Manual testing ppt
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
Introduction to software testing
Introduction to software testingIntroduction to software testing
Introduction to software testing
 
Quality Assurance and Software Testing
Quality Assurance and Software TestingQuality Assurance and Software Testing
Quality Assurance and Software Testing
 
INTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFL
INTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFLINTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFL
INTRODUCTION TO ISTQB FOUNDATION LEVEL - CTFL
 
Automation testing
Automation testingAutomation testing
Automation testing
 
Chapter 5 - Test Management
Chapter 5 - Test ManagementChapter 5 - Test Management
Chapter 5 - Test Management
 
Automated Testing vs Manual Testing
Automated Testing vs Manual TestingAutomated Testing vs Manual Testing
Automated Testing vs Manual Testing
 
Software Testing
Software TestingSoftware Testing
Software Testing
 
SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4  SOFTWARE TESTING UNIT-4
SOFTWARE TESTING UNIT-4
 
Test case techniques
Test case techniquesTest case techniques
Test case techniques
 
Software Testing Basics
Software Testing BasicsSoftware Testing Basics
Software Testing Basics
 
What is Integration Testing? | Edureka
What is Integration Testing? | EdurekaWhat is Integration Testing? | Edureka
What is Integration Testing? | Edureka
 
Software testing.ppt
Software testing.pptSoftware testing.ppt
Software testing.ppt
 
Testing
TestingTesting
Testing
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 
Chapter 6 - Tool Support for Testing
Chapter 6 - Tool Support for TestingChapter 6 - Tool Support for Testing
Chapter 6 - Tool Support for Testing
 
Black box testing lecture 11
Black box testing lecture 11Black box testing lecture 11
Black box testing lecture 11
 
Chapter 1 - Fundamentals of Testing
Chapter 1 - Fundamentals of TestingChapter 1 - Fundamentals of Testing
Chapter 1 - Fundamentals of Testing
 

Semelhante a Testing techniques

Quality Assurance
Quality AssuranceQuality Assurance
Quality AssuranceKiran Kumar
 
Code coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspectiveCode coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspectiveEngineering Software Lab
 
Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective   Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective Engineering Software Lab
 
Estimating test effort part 2 of 2
Estimating test effort part 2 of 2Estimating test effort part 2 of 2
Estimating test effort part 2 of 2Ian McDonald
 
Software testing mtech project in jalandhar
Software testing mtech project in jalandharSoftware testing mtech project in jalandhar
Software testing mtech project in jalandhardeepikakaler1
 
Software testing mtech project in ludhiana
Software testing mtech project in ludhianaSoftware testing mtech project in ludhiana
Software testing mtech project in ludhianadeepikakaler1
 
Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniquesersanbilik
 
Test Coverage: An Art and a Science
Test Coverage: An Art and a ScienceTest Coverage: An Art and a Science
Test Coverage: An Art and a ScienceTeamQualityPro
 
Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic TestingJimi Patel
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing FundamentalsKiran Kumar
 
Software testing
Software testingSoftware testing
Software testingBala Ganesh
 
Testing lab manual Testing lab manual sqa
Testing lab manual Testing lab manual sqaTesting lab manual Testing lab manual sqa
Testing lab manual Testing lab manual sqaMuhammadAdnan845624
 
Qat09 presentations dxw07u
Qat09 presentations dxw07uQat09 presentations dxw07u
Qat09 presentations dxw07uShubham Sharma
 

Semelhante a Testing techniques (20)

Quality Assurance
Quality AssuranceQuality Assurance
Quality Assurance
 
Black Box Testing
Black Box TestingBlack Box Testing
Black Box Testing
 
Testing
TestingTesting
Testing
 
Lesson 2....PPT 1
Lesson 2....PPT 1Lesson 2....PPT 1
Lesson 2....PPT 1
 
Code coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspectiveCode coverage in theory and in practice form the do178 b perspective
Code coverage in theory and in practice form the do178 b perspective
 
Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective   Code Coverage in Theory and in practice form the DO178B perspective
Code Coverage in Theory and in practice form the DO178B perspective
 
Estimating test effort part 2 of 2
Estimating test effort part 2 of 2Estimating test effort part 2 of 2
Estimating test effort part 2 of 2
 
SE%200-Testing%20(2).pptx
SE%200-Testing%20(2).pptxSE%200-Testing%20(2).pptx
SE%200-Testing%20(2).pptx
 
black-box-1.pdf
black-box-1.pdfblack-box-1.pdf
black-box-1.pdf
 
Software testing mtech project in jalandhar
Software testing mtech project in jalandharSoftware testing mtech project in jalandhar
Software testing mtech project in jalandhar
 
Software testing mtech project in ludhiana
Software testing mtech project in ludhianaSoftware testing mtech project in ludhiana
Software testing mtech project in ludhiana
 
Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniques
 
Test Coverage: An Art and a Science
Test Coverage: An Art and a ScienceTest Coverage: An Art and a Science
Test Coverage: An Art and a Science
 
Dynamic Testing
Dynamic TestingDynamic Testing
Dynamic Testing
 
Testing Fundamentals
Testing FundamentalsTesting Fundamentals
Testing Fundamentals
 
Unit testing - A&BP CC
Unit testing - A&BP CCUnit testing - A&BP CC
Unit testing - A&BP CC
 
Software testing
Software testingSoftware testing
Software testing
 
Testing lab manual Testing lab manual sqa
Testing lab manual Testing lab manual sqaTesting lab manual Testing lab manual sqa
Testing lab manual Testing lab manual sqa
 
testing
testingtesting
testing
 
Qat09 presentations dxw07u
Qat09 presentations dxw07uQat09 presentations dxw07u
Qat09 presentations dxw07u
 

Último

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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
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
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
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
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Último (20)

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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
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
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
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...
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
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
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

Testing techniques

  • 1. Finding the Defects that Matter
  • 2. Contents Objective 1 Black Box Testing Technique 2 White Box Testing Techniques 3 Grey Box Testing Techniques 4 Never Ending Techniques 5
  • 3. Objective Rules are SIMPLE , but Walking the WALK is not The objective of this presentation is to understand the various testing techniques so that we can use them effectively
  • 5.
  • 6. Black-Box Testing Techniques A technique for testing equivalence classes rather than undertaking exhaustive testing of each value of the larger class. A technique that consists of developing test cases and data that focus on the input and output boundaries of a given function. “ A race occurs when two threads can access (read or write) a data variable simultaneously and at least one of the two accesses is a write .” Error Guessing is the art of guessing where errors can be hidden.
  • 7. Equivalence Partitioning Range: Valid Class:1 Invalid Class:2 Specific Value Valid Class:1 Invalid Class:2 Login page , user field can accept 6 to 55 character Valid Class :- 6 ≤ USR ≥ 55 Invalid Class: USR < 6 Invalid Class: USR > 55 If specifications state that a maximum of 4 online books can be registered against anyone session thru instructor. Valid Class: 1 ≤ No. of online books ≥ 4 Invalid Class: No. of online books > 4 Invalid Class: No. of online books < 1
  • 8. Equivalence Partitioning cont… Member of Sets Valid Class:1 Invalid Class:1 Boolean Valid Class:1 Invalid Class:1 If a discount code must be input as P for preferred customer, R for standard reduced rate, or N for none, and if each case is treated differently. Valid class = P, R, N Invalid class code is not one of P, R, N If checkbox is checked or unchecked. Checked/ Unchecked Either True / False Or Yes / No
  • 9.
  • 10. Race Condition What occurs when a number of programs rely on certain timing conditions. A Program can only execute and carry out its task when a second program has completed. If the first program tries to execute before the second program has completed then anomalous results occur. Almost invariably race conditions give rise to anomalous behavior.
  • 11. Error Guessing Process of making an educated guess as to other types of areas to be tested . Intuition Experience The program reads a file. What happens if the program gets an empty file or the file does not exists? Tester would create test cases for those conditions.
  • 12. White-Box Testing Design test cases to exercise as many paths through the code as possible White box testing focuses on the internals of the systems.
  • 13. White Box Testing Techniques Statement Coverage requires that each statement will have been executed at least once. Simplest form of logic coverage. Also known as Node Coverage. Path Coverage requires that all program paths will have been traversed at least once. Condition Coverage requires that each condition will have been True at least once and False at least once. In this white box testing technique we try to identify how many program functions are covered by test cases. So, while providing function coverage, test cases can be written so as to exercise each of different functions in the code.
  • 14. Statement Coverage Example   i = 0 ; if (code = = &quot;y&quot;) { statement –1 ; statement –2 ; : : statement - n ; } else result = {marks / I} * 100 ; In this program, when we test with code = &quot;y&quot;, we will get 80% code coverage. But if the data distribution in the real world is such that 90% of the time, the value of code is not = &quot;y&quot;, then, the program will fail 90% of the time because of the exception-divide by zero. Thus. even with a code coverage of 80%, we are left with a defect that hits the users 90% of the time. The path coverage technique described below overcomes this problem.
  • 15. Cyclomatic Complexity Step – 1: Start writing the following C – program # include <stdio.h> # include <conio.h> (1) int main ( ) (2) { (3) int a, b, c, boolean = 0; (4) printf (&quot; Enter side-a :&quot;); (5) scanf (&quot;%d&quot;, & a); (6) printf(&quot; Enter side-b :&quot;); (7) scanf (&quot;%d&quot;, & b); (8) printf (&quot; Enter side-c:&quot;); (9) scanf (‘'%d&quot;, & c); (10) if ((a > 0) && (a < - 100) && (b > 0) && (b < . 100) && (c > 0) && (c < =100)) { (11) if ((a + b) > c) && ((c + a) > b) && ((b + c) > a)) { (12) boolean = 1; (13) } (14) } (15) else { (16) boolean = -1; (17) }
  • 16. Cyclomatic Complexity cont…... (18) if (boolean = = 1) { (19) if ((a = =b) && (b = =c)) { (20) printf (&quot;Triangle is equilateral&quot;); (21) } (22) else if ((a = =b) I I (b = = c) I I (c = = a)) { (23) print (&quot;Triangle is isosceles&quot;); (24) } (25) else { (26) printf(&quot;Triangle is scalene”); (27) } (28) } (29) else if (boolean = = 0) { (30) printf (&quot;Not a triangle&quot;); (31) } (32) else (33) printf (&quot; invalid input range&quot;); (34) } (35) getch ( ); (36) return -1; (37) }
  • 17. Cyclomatic Complexity cont…... Step – 2 Draw the following Flow Graph Step – 3: Draw the following DD Path Graph
  • 18. Cyclomatic Complexity cont…... Step – 4: Calculation of Cyclomatic Complexity V(G) by three methods
  • 19. Cyclomatic Complexity cont…... Conclusion 1 Conclusion 2 Each of these paths consists of at least one new edge. Hence this basis set of paths is NOT unique. Test cases should be designed for the independent path execution as identified above . Conclusion 3 We must execute these paths at least once in order to test the program thoroughly.
  • 20. Condition Coverage: This technique of condition coverage or predicate monitors whether every operand in a complex logical expression has taken on every True / False value. Obviously, this will mean more test cases and the number of test cases and the number of test cases will rise exponentially with the number of conditions and Boolean expressions. For example, in if-then-else, there are 2 2 or 4 possible True / False conditions. The condition coverage which indicates the percentage of conditions covered by a set of test cases, is defined by the following formula Condition Coverage = (Total Decisions Exercised) / (Total Number of Decisions in Program) x 100 Thus it becomes quite clear that this technique of condition coverage is much stronger criteria than path coverage, which in turn is a much stronger criteria than statement coverage.
  • 21.
  • 22. Function Coverage cont…… Conclusion Better code coverage is the result of better code flow understanding and writing effective test cases. Code coverage up to 40-50% is usually achievable. Code coverage of more than 80% requires enormous amount of effort and understanding of the code.
  • 23. Gray Box Testing Technique
  • 24. Gray Box Testing Technique cont.. Consider a hypothetical case wherein you have to test a web application. Functionality of this web application is very simple, you just need to enter your personal details like email and field of interest on the web form and submit this form . Server will get these details, and based on the field of interest pick some articles and mail it to the given email. Email validation is happening at the client side using Java Scripts.
  • 25. Grey Box Testing Technique cont.. Server will never get invalid mail ID Server will never send mail to invalid ID Server will never receive failure notification for this mail System is making following assumptions
  • 26. Gray Box Testing Technique cont.. Due to any reason if Java Scripts are disabled . Server will get invalid mail ID Server will send mail to invalid mail ID Server will receive failure notification
  • 27. Never Ending Testing Techniques -- Check it out… There are a large number of testing techniques in addition to the defined ones. Try the techniques which best suits your application.