Test Case Design Techniques
are,
·
Error
Guessing
·
Equivalence
Partitioning
·
Boundary
Value Analysis (BVA)
Error
Guessing :
Guessing
the error. If the Amount text field asks for only integers, we enter all other
values, like – decimal, special character, negative etc. Check for all the
values mentioned above.
Equivalence
Partitioning
Pressman Practice (what we really do)
According
to Pressman,
1) If the input is a range of values, then
design the test cases for 1valid and 2invalid values.
For ex, Amount text field accepts range of
values
2) If the input is a set of values, then
design the test cases for 1valid and 2invalid values.
3) If the input is Boolean, then design
the test cases for both true and false values. Ex – checkboxes, radiobuttons
etc.
In
PRACTICE, we do the following,
Testing
the application by deriving the below values,
90 100 1000 2000 3000 4000 5000 6000
Lets
see a program. Understand the logic and analyse why we use Practice method,
If
(amount <100 or >5000)
{
Error message
}
If (amount between 100 & 2000)
{
Deduct 2%
}
If (amount > 2000)
{
Deduct 3%
}
When
Pressman techniques are used, the first 2 programs are tested, but if Practice
method is used, all these are covered.
It
is not necessary that for all applications, practice methodology needs to be
used. Sometimes, Pressman is also fine.
But,
if the application has any deviation, splits or precision – then we go for
Practice method.
If
Practice methodology has to be used, it should be – a) Case specific b) Product specific
c) Number of divisions depends on the
precision (2% or 3% deduction)
Here,
Pressman technique is enough to test for Age text field (1 valid and 2invalid)
But,
if the Age text field is for insurance (10years and above compulsory and
different policies for different age groups) – then we need to use Practice
method. Depending on this, divisions of values are done.
BVA
– Boundary Value Analysis
If
input is a range of values between A – B, then design test case for A, A+1, A-1
and B, B+1, B – 1.
Thus,
a number of bugs can be found when applying BVA because developer tends to
commit mistakes in this area when writing code.
If
( Amount < = 100 )
{
Throw error
}
If
( Amount > = 5000 )
{
…..
}
If
‘equals’ is there, then even 100 value is expected.
When
comparing Equivalence Partitioning and BVA, testing values are repeated – if
that is the case, we can neglect Equivalence Partitioning and perform only BVA
as it covers all the values.
What is Decision Table Testing?
Decision table testing is a software testing technique used to test system behavior for different input combinations. This is a systematic approach where the different input combinations and their corresponding system behavior (Output) are captured in a tabular form. That is why it is also called as a Cause-Effect table where Cause and effects are captured for better test coverage.
A Decision Table is a tabular representation of inputs versus rules/cases/test conditions.
The significance of this technique becomes immediately clear as the number of inputs increases. Number of possible Combinations is given by 2 ^ n , where n is the number of Inputs.
What is State Transition in Testing?
State Transition testing is defined as the software testing technique in which changes in input conditions cause's state changes in the Application under Test (AUT).
It is a black box testing technique in which the tester analyzes the behavior of an application under test for different input conditions in a sequence. In this technique, tester provides both positive and negative input test values and record the system behavior.
It is the model on which the system and the tests are based. Any system where you get a different output for the same input, depending on what has happened before, is a finite state system.
State Transition Testing Technique is helpful where you need to test different system transitions.