TESTING
Unit testing
Unit testing
Unit testing
Software Testing
Software Testing is a process of evaluating a system by
manual or automatic means and verify that it satisfies
specified requirements or identify differences between
expected and actual results.
Why Software Testing ????
 Error Free
 Efficient
 Secured
 Flexible
Software Testing is important as it may cause mission
failure, impact on operational performance and
reliability, if not done properly !
Software Faults and Failures Objective of Testing
•Objective of testing: discover faults
•A test is successful only when a fault is discovered
Fault identification is the process of determining
what fault(s) caused the failure
Fault correction is the process of making changes to
the system so that the faults are removed
 Is a level of the software testing process where
individual units/components of a software/system are
tested.
 The purpose is to validate that each unit of the software
performs as designed.
Software Faults and Failures
Software Faults and Failures
Unit Testing
 Each part tested
individually
 All components
tested at least
once
 Errors picked up
earlier
 Scope is smaller,
easier to fix errors
Unit Testing Ideals
 Isolatable
 Repeatable
 Automatable
 Easy to Write
Why Unit Test?
 Faster Debugging
 Faster Development
 Better Design
 Excellent Regression Tool
 Reduce Future Cost
Tools:
Test driver/harness
Code coverage analyzer
Automatic test case generator
BENEFITS
 Unit testing allows the programmer to refactor
code at a later date, and make sure the
module still works correctly.
 By testing the parts of a program first and then
testing the sum of its parts, integration testing
becomes much easier.
 Unit testing provides a sort of living
documentation of the system.
Unit Testing Techniques:
Functional testing techniques:
These are Black box testing techniques
which tests the functionality of the
application.
Some of Functional testing
techniques
 Input domain testing: This testing technique
concentrates on size and type of every input object in
terms of boundary value analysis and Equivalence
class.
 Boundary Value: Boundary value analysis is
a software testing design technique in which tests are
designed to include representatives of boundary
values.
 Syntax checking: This is a technique which is used
to check the Syntax of the application.
 Equivalence Partitioning: This is a software testing
technique that divides the input data of a software unit
into partition of data from which test cases can be
derived
Unit Testing Techniques:
Error based Techniques:
The best person to know the defects
in his code is the person who has
designed it.
Unit testing
BLACK BOX TESTING, also known as Behavioral
Testing, is a software testing method in which the
internal structure/design/implementation of the item
being tested is not known to the tester. These tests can be
functional or non-functional, though usually functional.
BLACK BOX
TESTING
Example
A tester, without knowledge of the internal structures of a website, tests
the web pages by using a browser; providing inputs (clicks, keystrokes)
and verifying the outputs against the expected outcome.
BLACK BOX TESTING
This method is named so because the software program,
in the eyes of the tester, is like a black box; inside which
one cannot see. This method attempts to find errors in the
following categories:
•Incorrect or missing functions
•Interface errors
•Errors in data structures or external database access
•Behavior or performance errors
•Initialization and termination errors
BLACK BOX TESTING
METHODS/TECHNIQUES
Following are some techniques that can be used for designing black
box tests.
Equivalence Partitioning: It is a software test design technique that
involves dividing input values into valid and invalid partitions and
selecting representative values from each partition as test data.
Boundary Value Analysis: It is a software test design technique that
involves the determination of boundaries for input values and
selecting values that are at the boundaries and just inside/ outside of
the boundaries as test data.
Cause-Effect Graphing: It is a software test design technique that
involves identifying the cases (input conditions) and effects (output
conditions), producing a Cause-Effect Graph, and generating test
cases accordingly.
Equivalence Class Partitioning (ECP).
1. Equivalence Class Partitioning :
The concept of equivalence partitioning technique comes from equivalence class which
in turn comes from equivalence relation. Equivalence class partitioning is a
technique of software black box testing in which input data is divided into
partitions of equivalent data that is valid and invalid values. This strategy is used to
minimize the number of possible test cases while maintains reasonable test coverage.
Steps involves in this technique are:
•Divide any input domain into two sets that is valid values and invalid values.
•Test cases are developed :
a. Assign unique identification number to each valid and invalid class of input.
b. Write the test cases i.e. valid and invalid test cases
Unit testing
As present in the above image, an “AGE” text field accepts only the numbers
from 18 to 60. There will be three sets of classes or groups.
Two invalid classes will be:
a) Less than or equal to 17.
b) Greater than or equal to 61.
One valid class will be anything between 18 to 60.
We have thus reduced the test cases to only 3 test cases based on the formed
classes thereby covering all the possibilities. So, testing with anyone value
from each set of the class is sufficient to test the above scenario.
Example of Equivalence Partitions •
Windows filename can contain any characters
except / : * ? " < > |.
• Filenames can have from 1 to 255 characters.
• Creating test cases for filenames:
• Will have equivalence partitions for valid
characters, invalid characters, valid length names,
names that are too short and names that are too
long.
From the name itself, we can understand that in this technique we
focus on the values at boundaries as it is found that many
applications have a high amount of issues on the boundaries.
Boundary means the values near the limit where the behavior of the
system changes. In boundary value analysis both the valid inputs
and invalid inputs are being tested to verify the issues.
BOUNDARY VALUE ANALYSIS
If we want to test a field where values from 1 to 100 should
be accepted then we choose the boundary values: 1-1, 1, 1+1,
100-1, 100, and 100+1. Instead of using all the values from 1
to 100, we just use 0, 1, 2, 99, 100, and 101.
Example
An exam has a pass boundary at 50 percent, merit at 75
percent and distinction at 85 percent. The Valid
Boundary values for this scenario will be as follows:
49, 50 - for pass
74, 75 - for merit
84, 85 - for distinction
Boundary values are validated against both the valid
boundaries and invalid boundaries.
The Invalid Boundary Cases for the above example can
be given as follows:
0 - for lower limit boundary value
101 - for upper limit boundary value
Example on Boundary Value Analysis Test
Case Design Technique:
Assume, we have to test a field which accepts
Age 18 – 56
Minimum boundary value is 18
Maximum boundary value is 56
Valid Inputs: 18,19,55,56
Invalid Inputs: 17 and 57
Test case 1: Enter the value 17 (18-1) = Invalid
Test case 2: Enter the value 18 = Valid
Test case 3: Enter the value 19 (18+1) = Valid
Test case 4: Enter the value 55 (56-1) = Valid
Test case 5: Enter the value 56 = Valid
Test case 6: Enter the value 57 (56+1) =Invalid
Example 2:
Assume we have to test a text field (Name)
which accepts the length between 6-12
characters.
Minimum boundary value is 6
Maximum boundary value is 12
Valid text length is 6, 7, 11, 12
Invalid text length is 5, 13
Test case 1: Text length of 5 (min-1) = Invalid
Test case 2: Text length of exactly 6 (min) = Valid
Test case 3: Text length of 7 (min+1) = Valid
Test case 4: Text length of 11 (max-1) = Valid
Test case 5: Text length of exactly 12 (max) =
Valid
Test case 6: Text length of 13 (max+1) = Invalid
Example 1 for Boundary Value Analysis :
Password field accepts minimum 6 characters and maximum 12 characters. [Range
is 6-12]
Write Test Cases considering values from Valid region and each Invalid Region
and Values which define exact boundary.
We need to execute 5 Test Cases for our Example 1.
1. Consider password length less than 6
2. Consider password of length exactly 6
3. Consider password of length between 7 and 11
4. Consider password of length exactly 12
5. Consider password of length more than 12
Note : 1st and 5th Test Cases are considered for Negative Testing
Example 2 for Boundary Value Analysis :
Test cases for input box accepting numbers between 1 and 1000 using Boundary value analysis:
1) Test cases with test data exactly as the input boundaries of input domain i.e. values 1 and 1000
in our case.
2) Test data with values just below the extreme edges of input domains i.e. values 0 and 999.
3) Test data with values just above the extreme edges of input domain i.e. values 2 and 1001.
Example 3 for Boundary Value Analysis :
Name text box which allows 1-30 characters. So in this case writing test cases by entering each
character once will be very difficult so then will choose boundary value analysis.
So in this case at max 5 test cases will come:
Test case1: minimum -1 character: Validating not entering anything in text box
Test case2: minimum +1 character: Validating with only one char
Test case3: maximum -1 character: Validating with 29 chars
Test case4: minimum +1 character: Validating with 31 characters
Test case1: any one middle number: validating with 15 chars
Cause-effect graph is a software testing technique that involves
specifying the causes (input conditions) and effects (output
conditions) and producing a Cause-Effect Graph, and designed test
cases. Causes are the input conditions and effects are the output
conditions. The causes and effects are represented using Boolean
graphs. It is also known as Ishikawa diagram as it was invented by
Kaoru Ishikawa or fish bone diagram because of the way it looks.
steps involved in this technique are :
Specify causes and effects.
 Produce the cause effect graph.
Convert the cause-effect graph into decision table.
Convert decision table rules into the test cases.
CAUSE EFFECT GRAPH :
The Cause-Effect Diagram can be used under these
Circumstances:
•To determine the current problem so that right decision can be
taken very fast.
•To narrate the connections of the system with the factors affecting
a particular process or effect.
•To recognize the probable root causes, the cause for a exact effect,
problem, or outcome.
A “Cause” stands for a separate input condition that fetches about an internal
change in the system. An “Effect” represents an output condition, a system
transformation or a state resulting from a combination of causes.
Steps to proceed on Cause-Effect
Diagram:
Firstly: Recognize and describe the
input conditions (causes) and
actions (effect)
Secondly: Build up a cause-effect
graph
Third: Convert cause-effect graph
into a decision table
Fourth: Convert decision table
rules to test cases. Each column of
the decision table represents a test
case
SYMBOLS USED IN CAUSE-EFFECT GRAPHS:
Unit testing
4. Decision Table Testing :
Decision table testing is a software testing technique in which various input
combinations and their system behavior are represented in a tabular form. A decision
table places the causes (input conditions) and effects (output conditions) in a matrix. Each
column represents unique combination.
As the name describes that, there are logical relationships like :
if(Condition = True)
{
then action 1 ;
}
else
{
action 2;
}
Then a tester will identify two outputs for two conditions so based on the probable scenarios a
Decision table is created to design the test cases.
For Example:
Take an example of XYZ bank that provides interest rate for the
Male senior citizen as 10% and for the rest of the people 9%.
In this example condition, C1 has two values as true and false,
condition C2 also has two values as true and false. The number
of total possible combinations would then be four. This way we
can derive test cases using a decision table.
5) Error Guessing
This is a classic example of Experience-Based Testing.
In this technique, the tester can use his/her experience about the
application behavior and functionalities to guess the error-prone areas.
Many defects can be found using error guessing where most of the
developers usually make mistakes.
Few common mistakes that developers usually forget to handle:
Divide by zero.
Handling null values in text fields.
Accepting the Submit button without any value.
File upload without attachment.
File upload with less than or more than the limit size.
● White-box/Structure-based measures and its related
design techniques are described in BS7925-2 standard.
● A software testing technique whereby explicit
knowledge of the internal workings of the item being
tested are used to select the test data.
● White Box testing is based on specific knowledge of
the source code to define the test cases and to examine
outputs.
INTRODUCTION: WHITE BOX TESTING
● Testing based on an analysis of the internal structure of
the component or system.
● White Box testing is also known as Clear Box testing,
Glass Box testing, Transparent Box testing, and Structure-
Based testing.
● It can be applied at all levels of SDLC.
● Most of the defects are found in Unit, Component &
Integration levels is through White-box.
DEFINITION:
WHITE BOX TESTING
WHITE BOX TESTING
Unit testing
Unit testing
Unit testing
Unit testing

More Related Content

PPTX
White Box Testing
PDF
Software testing methods, levels and types
PDF
black-box-1.pdf
PDF
Functional Testing Tutorial | Edureka
PPT
Dynamic Testing
PPTX
Validation testing
PPT
Black box and white box testing
PPT
Virtualization in cloud
White Box Testing
Software testing methods, levels and types
black-box-1.pdf
Functional Testing Tutorial | Edureka
Dynamic Testing
Validation testing
Black box and white box testing
Virtualization in cloud

What's hot (20)

ODP
The Art Of Debugging
PPTX
The complete guide for software integration testing | David Tzemach
PPTX
Distributed Memory Programming with MPI
PDF
Compatibility Testing
PPTX
PPTX
Finite state Transducers and mealy Machine
PPTX
Static Testing
PPT
Path testing, data flow testing
PPT
Uml lecture
PPT
Boundary value analysis
PPT
Test plan
PPT
POST’s CORRESPONDENCE PROBLEM
PPTX
Component Based Software Engineering
PPTX
Security Architecture of the Java platform
PPT
SINGLE SOURCE SHORTEST PATH.ppt
PPTX
Software Engineering- Types of Testing
PPT
White box testing-200709
PPTX
Software Testing Basics
PPTX
Operating system 11 system calls
PPTX
20345-1B_02.pptx
The Art Of Debugging
The complete guide for software integration testing | David Tzemach
Distributed Memory Programming with MPI
Compatibility Testing
Finite state Transducers and mealy Machine
Static Testing
Path testing, data flow testing
Uml lecture
Boundary value analysis
Test plan
POST’s CORRESPONDENCE PROBLEM
Component Based Software Engineering
Security Architecture of the Java platform
SINGLE SOURCE SHORTEST PATH.ppt
Software Engineering- Types of Testing
White box testing-200709
Software Testing Basics
Operating system 11 system calls
20345-1B_02.pptx
Ad

Similar to Unit testing (20)

PPTX
Software Testing strategies, their types and Levels
PPTX
Lec 17.pptx
PPTX
presentation_testing_1455044600_187410.pptx
PPT
Testing
PPTX
ISTQB Foundation Level – Chapter 4: Test Design Techniques
PDF
Black Box Testing.pdf
PPTX
Lavenya Testing.pptx
PPT
blckboxtesting.ppt il.;io'/ ulio'[ yjko8i[0'-p/ yk
PPTX
dynamic testing for polytechnic students
PPT
Test Techniques
PPT
Software Testing Techniques
PPTX
Black box testing methods for software components
PPTX
SE%200-Testing%20(2).pptx
PPTX
Software Testing Introduction (Part 2)
PPTX
Blackbox
PPTX
Test Effectiveness
PPT
&lt;p>Software Testing&lt;/p>
PPT
An overview to Software Testing
PPT
12 functional-system-testing
Software Testing strategies, their types and Levels
Lec 17.pptx
presentation_testing_1455044600_187410.pptx
Testing
ISTQB Foundation Level – Chapter 4: Test Design Techniques
Black Box Testing.pdf
Lavenya Testing.pptx
blckboxtesting.ppt il.;io'/ ulio'[ yjko8i[0'-p/ yk
dynamic testing for polytechnic students
Test Techniques
Software Testing Techniques
Black box testing methods for software components
SE%200-Testing%20(2).pptx
Software Testing Introduction (Part 2)
Blackbox
Test Effectiveness
&lt;p>Software Testing&lt;/p>
An overview to Software Testing
12 functional-system-testing
Ad

Recently uploaded (20)

PPTX
"Array and Linked List in Data Structures with Types, Operations, Implementat...
PPT
Chapter 1 - Introduction to Manufacturing Technology_2.ppt
PDF
August 2025 - Top 10 Read Articles in Network Security & Its Applications
PDF
August -2025_Top10 Read_Articles_ijait.pdf
PPTX
Software Engineering and software moduleing
DOC
T Pandian CV Madurai pandi kokkaf illaya
PDF
Unit1 - AIML Chapter 1 concept and ethics
PDF
[jvmmeetup] next-gen integration with apache camel and quarkus.pdf
DOCX
ENVIRONMENTAL PROTECTION AND MANAGEMENT (18CVL756)
PDF
distributed database system" (DDBS) is often used to refer to both the distri...
PPTX
CN_Unite_1 AI&DS ENGGERING SPPU PUNE UNIVERSITY
PDF
VSL-Strand-Post-tensioning-Systems-Technical-Catalogue_2019-01.pdf
PPTX
Management Information system : MIS-e-Business Systems.pptx
PDF
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
PPTX
Amdahl’s law is explained in the above power point presentations
PPTX
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
PPTX
Principal presentation for NAAC (1).pptx
PDF
Design of Material Handling Equipment Lecture Note
PDF
electrical machines course file-anna university
PDF
20250617 - IR - Global Guide for HR - 51 pages.pdf
"Array and Linked List in Data Structures with Types, Operations, Implementat...
Chapter 1 - Introduction to Manufacturing Technology_2.ppt
August 2025 - Top 10 Read Articles in Network Security & Its Applications
August -2025_Top10 Read_Articles_ijait.pdf
Software Engineering and software moduleing
T Pandian CV Madurai pandi kokkaf illaya
Unit1 - AIML Chapter 1 concept and ethics
[jvmmeetup] next-gen integration with apache camel and quarkus.pdf
ENVIRONMENTAL PROTECTION AND MANAGEMENT (18CVL756)
distributed database system" (DDBS) is often used to refer to both the distri...
CN_Unite_1 AI&DS ENGGERING SPPU PUNE UNIVERSITY
VSL-Strand-Post-tensioning-Systems-Technical-Catalogue_2019-01.pdf
Management Information system : MIS-e-Business Systems.pptx
Influence of Green Infrastructure on Residents’ Endorsement of the New Ecolog...
Amdahl’s law is explained in the above power point presentations
Graph Data Structures with Types, Traversals, Connectivity, and Real-Life App...
Principal presentation for NAAC (1).pptx
Design of Material Handling Equipment Lecture Note
electrical machines course file-anna university
20250617 - IR - Global Guide for HR - 51 pages.pdf

Unit testing

  • 5. Software Testing Software Testing is a process of evaluating a system by manual or automatic means and verify that it satisfies specified requirements or identify differences between expected and actual results.
  • 6. Why Software Testing ????  Error Free  Efficient  Secured  Flexible Software Testing is important as it may cause mission failure, impact on operational performance and reliability, if not done properly !
  • 7. Software Faults and Failures Objective of Testing •Objective of testing: discover faults •A test is successful only when a fault is discovered Fault identification is the process of determining what fault(s) caused the failure Fault correction is the process of making changes to the system so that the faults are removed  Is a level of the software testing process where individual units/components of a software/system are tested.  The purpose is to validate that each unit of the software performs as designed.
  • 10. Unit Testing  Each part tested individually  All components tested at least once  Errors picked up earlier  Scope is smaller, easier to fix errors
  • 11. Unit Testing Ideals  Isolatable  Repeatable  Automatable  Easy to Write
  • 12. Why Unit Test?  Faster Debugging  Faster Development  Better Design  Excellent Regression Tool  Reduce Future Cost Tools: Test driver/harness Code coverage analyzer Automatic test case generator
  • 13. BENEFITS  Unit testing allows the programmer to refactor code at a later date, and make sure the module still works correctly.  By testing the parts of a program first and then testing the sum of its parts, integration testing becomes much easier.  Unit testing provides a sort of living documentation of the system.
  • 14. Unit Testing Techniques: Functional testing techniques: These are Black box testing techniques which tests the functionality of the application.
  • 15. Some of Functional testing techniques  Input domain testing: This testing technique concentrates on size and type of every input object in terms of boundary value analysis and Equivalence class.  Boundary Value: Boundary value analysis is a software testing design technique in which tests are designed to include representatives of boundary values.  Syntax checking: This is a technique which is used to check the Syntax of the application.  Equivalence Partitioning: This is a software testing technique that divides the input data of a software unit into partition of data from which test cases can be derived
  • 16. Unit Testing Techniques: Error based Techniques: The best person to know the defects in his code is the person who has designed it.
  • 18. BLACK BOX TESTING, also known as Behavioral Testing, is a software testing method in which the internal structure/design/implementation of the item being tested is not known to the tester. These tests can be functional or non-functional, though usually functional. BLACK BOX TESTING
  • 19. Example A tester, without knowledge of the internal structures of a website, tests the web pages by using a browser; providing inputs (clicks, keystrokes) and verifying the outputs against the expected outcome. BLACK BOX TESTING
  • 20. This method is named so because the software program, in the eyes of the tester, is like a black box; inside which one cannot see. This method attempts to find errors in the following categories: •Incorrect or missing functions •Interface errors •Errors in data structures or external database access •Behavior or performance errors •Initialization and termination errors BLACK BOX TESTING
  • 21. METHODS/TECHNIQUES Following are some techniques that can be used for designing black box tests. Equivalence Partitioning: It is a software test design technique that involves dividing input values into valid and invalid partitions and selecting representative values from each partition as test data. Boundary Value Analysis: It is a software test design technique that involves the determination of boundaries for input values and selecting values that are at the boundaries and just inside/ outside of the boundaries as test data. Cause-Effect Graphing: It is a software test design technique that involves identifying the cases (input conditions) and effects (output conditions), producing a Cause-Effect Graph, and generating test cases accordingly.
  • 22. Equivalence Class Partitioning (ECP). 1. Equivalence Class Partitioning : The concept of equivalence partitioning technique comes from equivalence class which in turn comes from equivalence relation. Equivalence class partitioning is a technique of software black box testing in which input data is divided into partitions of equivalent data that is valid and invalid values. This strategy is used to minimize the number of possible test cases while maintains reasonable test coverage. Steps involves in this technique are: •Divide any input domain into two sets that is valid values and invalid values. •Test cases are developed : a. Assign unique identification number to each valid and invalid class of input. b. Write the test cases i.e. valid and invalid test cases
  • 24. As present in the above image, an “AGE” text field accepts only the numbers from 18 to 60. There will be three sets of classes or groups. Two invalid classes will be: a) Less than or equal to 17. b) Greater than or equal to 61. One valid class will be anything between 18 to 60. We have thus reduced the test cases to only 3 test cases based on the formed classes thereby covering all the possibilities. So, testing with anyone value from each set of the class is sufficient to test the above scenario.
  • 25. Example of Equivalence Partitions • Windows filename can contain any characters except / : * ? " < > |. • Filenames can have from 1 to 255 characters. • Creating test cases for filenames: • Will have equivalence partitions for valid characters, invalid characters, valid length names, names that are too short and names that are too long.
  • 26. From the name itself, we can understand that in this technique we focus on the values at boundaries as it is found that many applications have a high amount of issues on the boundaries. Boundary means the values near the limit where the behavior of the system changes. In boundary value analysis both the valid inputs and invalid inputs are being tested to verify the issues. BOUNDARY VALUE ANALYSIS
  • 27. If we want to test a field where values from 1 to 100 should be accepted then we choose the boundary values: 1-1, 1, 1+1, 100-1, 100, and 100+1. Instead of using all the values from 1 to 100, we just use 0, 1, 2, 99, 100, and 101.
  • 28. Example An exam has a pass boundary at 50 percent, merit at 75 percent and distinction at 85 percent. The Valid Boundary values for this scenario will be as follows: 49, 50 - for pass 74, 75 - for merit 84, 85 - for distinction Boundary values are validated against both the valid boundaries and invalid boundaries. The Invalid Boundary Cases for the above example can be given as follows: 0 - for lower limit boundary value 101 - for upper limit boundary value
  • 29. Example on Boundary Value Analysis Test Case Design Technique: Assume, we have to test a field which accepts Age 18 – 56
  • 30. Minimum boundary value is 18 Maximum boundary value is 56 Valid Inputs: 18,19,55,56 Invalid Inputs: 17 and 57 Test case 1: Enter the value 17 (18-1) = Invalid Test case 2: Enter the value 18 = Valid Test case 3: Enter the value 19 (18+1) = Valid Test case 4: Enter the value 55 (56-1) = Valid Test case 5: Enter the value 56 = Valid Test case 6: Enter the value 57 (56+1) =Invalid
  • 31. Example 2: Assume we have to test a text field (Name) which accepts the length between 6-12 characters.
  • 32. Minimum boundary value is 6 Maximum boundary value is 12 Valid text length is 6, 7, 11, 12 Invalid text length is 5, 13 Test case 1: Text length of 5 (min-1) = Invalid Test case 2: Text length of exactly 6 (min) = Valid Test case 3: Text length of 7 (min+1) = Valid Test case 4: Text length of 11 (max-1) = Valid Test case 5: Text length of exactly 12 (max) = Valid Test case 6: Text length of 13 (max+1) = Invalid
  • 33. Example 1 for Boundary Value Analysis : Password field accepts minimum 6 characters and maximum 12 characters. [Range is 6-12] Write Test Cases considering values from Valid region and each Invalid Region and Values which define exact boundary. We need to execute 5 Test Cases for our Example 1. 1. Consider password length less than 6 2. Consider password of length exactly 6 3. Consider password of length between 7 and 11 4. Consider password of length exactly 12 5. Consider password of length more than 12 Note : 1st and 5th Test Cases are considered for Negative Testing
  • 34. Example 2 for Boundary Value Analysis : Test cases for input box accepting numbers between 1 and 1000 using Boundary value analysis: 1) Test cases with test data exactly as the input boundaries of input domain i.e. values 1 and 1000 in our case. 2) Test data with values just below the extreme edges of input domains i.e. values 0 and 999. 3) Test data with values just above the extreme edges of input domain i.e. values 2 and 1001. Example 3 for Boundary Value Analysis : Name text box which allows 1-30 characters. So in this case writing test cases by entering each character once will be very difficult so then will choose boundary value analysis. So in this case at max 5 test cases will come: Test case1: minimum -1 character: Validating not entering anything in text box Test case2: minimum +1 character: Validating with only one char Test case3: maximum -1 character: Validating with 29 chars Test case4: minimum +1 character: Validating with 31 characters Test case1: any one middle number: validating with 15 chars
  • 35. Cause-effect graph is a software testing technique that involves specifying the causes (input conditions) and effects (output conditions) and producing a Cause-Effect Graph, and designed test cases. Causes are the input conditions and effects are the output conditions. The causes and effects are represented using Boolean graphs. It is also known as Ishikawa diagram as it was invented by Kaoru Ishikawa or fish bone diagram because of the way it looks. steps involved in this technique are : Specify causes and effects.  Produce the cause effect graph. Convert the cause-effect graph into decision table. Convert decision table rules into the test cases. CAUSE EFFECT GRAPH :
  • 36. The Cause-Effect Diagram can be used under these Circumstances: •To determine the current problem so that right decision can be taken very fast. •To narrate the connections of the system with the factors affecting a particular process or effect. •To recognize the probable root causes, the cause for a exact effect, problem, or outcome.
  • 37. A “Cause” stands for a separate input condition that fetches about an internal change in the system. An “Effect” represents an output condition, a system transformation or a state resulting from a combination of causes. Steps to proceed on Cause-Effect Diagram: Firstly: Recognize and describe the input conditions (causes) and actions (effect) Secondly: Build up a cause-effect graph Third: Convert cause-effect graph into a decision table Fourth: Convert decision table rules to test cases. Each column of the decision table represents a test case
  • 38. SYMBOLS USED IN CAUSE-EFFECT GRAPHS:
  • 40. 4. Decision Table Testing : Decision table testing is a software testing technique in which various input combinations and their system behavior are represented in a tabular form. A decision table places the causes (input conditions) and effects (output conditions) in a matrix. Each column represents unique combination. As the name describes that, there are logical relationships like : if(Condition = True) { then action 1 ; } else { action 2; } Then a tester will identify two outputs for two conditions so based on the probable scenarios a Decision table is created to design the test cases.
  • 41. For Example: Take an example of XYZ bank that provides interest rate for the Male senior citizen as 10% and for the rest of the people 9%. In this example condition, C1 has two values as true and false, condition C2 also has two values as true and false. The number of total possible combinations would then be four. This way we can derive test cases using a decision table.
  • 42. 5) Error Guessing This is a classic example of Experience-Based Testing. In this technique, the tester can use his/her experience about the application behavior and functionalities to guess the error-prone areas. Many defects can be found using error guessing where most of the developers usually make mistakes. Few common mistakes that developers usually forget to handle: Divide by zero. Handling null values in text fields. Accepting the Submit button without any value. File upload without attachment. File upload with less than or more than the limit size.
  • 43. ● White-box/Structure-based measures and its related design techniques are described in BS7925-2 standard. ● A software testing technique whereby explicit knowledge of the internal workings of the item being tested are used to select the test data. ● White Box testing is based on specific knowledge of the source code to define the test cases and to examine outputs. INTRODUCTION: WHITE BOX TESTING
  • 44. ● Testing based on an analysis of the internal structure of the component or system. ● White Box testing is also known as Clear Box testing, Glass Box testing, Transparent Box testing, and Structure- Based testing. ● It can be applied at all levels of SDLC. ● Most of the defects are found in Unit, Component & Integration levels is through White-box. DEFINITION: