2. SPECIFICATION-BASED (BLACK-BOX) TESTING
TECHNIQUES
• Each design has different types of defects
• Broadly Testing can be divided into Static and Dynamic testing
• Under dynamic testing we have Specification based or black box
• The tester is concentrating on what the software does, not how it does it
• Tester consider system under test as a black box, he only know sending this
input he will get expected output
• Includes functional as well as non-functional(performance, maintainability) etc.
• 4 types of specification based testing we be covering are:
1. Equivalence partitioning
2. Boundary value analysis
3. Decision tables
4. State transition testing
http://appium-selenium.com/
3. EQUIVALENCE AND BOUNDARY VALUE ANALYSIS
• Most common testing and people follow this without knowing
• In Equivalence Partitioning we make groups of similar conditions
• The equivalence partitioning technique requires that we need test
only one condition from each partition
Example
Interest paid in range 0 up to $100 is 2%
Interest paid over 100 to $500 is 5%
Interest above $500 is 10%
Wrong way
$50, $100, $150, $200, $250, $300
http://appium-selenium.com/
4. EQUIVALENCE AND BOUNDARY VALUE ANALYSIS
Equivalence partitioning
Invalid Valid-2% Valid-5% Valid-10%
-$0.01 $0-$100 $100.01-$500 $500.01
Correct way
-$10, $50, $123, $700
Boundary value analysis (BVA) is based on testing at the boundaries between
partitions
-$0.01, $0.00, $100, $100.01, $500, $500.01
http://appium-selenium.com/
5. DECISION TABLES
• Decision tables testing are more focused on business logic or business rules
• If different combinations of inputs result in different actions being taken, this can be
more difficult to show using equivalence partitioning and boundary value analysis
• Decision tables provide a systematic way of stating complex business rules, which is
useful for developers as well as for testers
1. While making decision table we need to identify input combinations
Conditions should be minimum
Conditions Rule 1 Rule 2 Rule 3 Rule 4
Age greater than 15
Man
2. Second step is to identify True/False
Conditions Rule 1 Rule 2 Rule 3 Rule 4
Age greater than 15 T T F F
Man T F T F
http://appium-selenium.com/
6. DECISION TABLES3. Third step is to enter outcome for each combination
Conditions Rule 1 Rule 2 Rule 3 Rule 4
Age greater than 15 T T F F
Man T F T F
-----------------------------------------------------------------------------------
Drink beer T T
Go to Club T T
4. Fourth step is to also consider the error messages
Conditions Rule 1 Rule 2 Rule 3 Rule 4
Age greater than 15 T T F F
Man T F T F
-----------------------------------------------------------------------------------
Drink beer T T
Go to Club T T
Error messages T
http://appium-selenium.com/
7. DECISION TABLES
5. Fifth steps table can easily adapt to requirements
Conditions Rule 1 Rule 2 Rule 3 Rule 4
Age greater than 15 T T F F
Man T F T F
-----------------------------------------------------------------------------------
Drink beer T
Go to Club T
Error messages T
6. Representing table again if more than one action results from any of the combinations
Conditions Rule 1 Rule 2 Rule 3 Rule 4
Age greater than 15 T T F F
Man T F T F
-----------------------------------------------------------------------------------
Outcomes Error Drink beer Goto Club Error
• Write test case for each Rule
http://appium-selenium.com/
8. STATE TRANSITION
• State transition testing is used when system can be in a (finite) number of
different states, and the transitions from one state to another are determined
by the rules
• e.g. withdrawing of $500 from ATM will depend on how much money in your
account
Stop
Acceleratebraking
Constant
Speed
Press accelerator
Press accelerator
Apply brakes
Apply brakes
Apply brakes
http://appium-selenium.com/