3.functional Testing 2 PDF
3.functional Testing 2 PDF
3.functional Testing 2 PDF
Dragos Dragan
QA Test Consultant
dragos.dragan@qualitance.com
b) Branch/Decision coverage
c) Path coverage
Test Classification
Functional / Non-Functional
Functional / Non-functional
Usability
Ease with which users can engage with the system
Maintainability
Ability to introduce changes into the system
Reliability
Ability of the system to perform required functions over time
Non-Functional Testing
Portability
Operation on different platforms
Recovery
Recovery procedures on failure
Instal-ability
Installation procedures
Non-Functional Testing
Security
Ensures that no unauthorized access can be gained to the system or it's
components
Interoperability
Operation of system when interacting in various environments
Accessibility
Focus on people with disabilities
Test Classification
Black-box and White-box
Black-box Testing
Black-box:
White-box:
Gray-box:
– Integration Testing
– System Testing
– Big-Bang integration
– Top-Down integration
– Bottom-Up integration
Disadvantages:
End-To-End functionality
– Environmental issues
System Testing
Purpose:
– Provide users with confidence that system will function according
to their expectations
A) Equivalence partitioning
Program that takes as a valid input an integer between 100 and 999
Test Case 1 2 3 4 5
Exp.
OK NOK NOK NOK NOK
Output
Equivalence partitioning: Example 2
• Non-valid:
20+ char
null
Black-Box Techniques
Boundary value analysis
Boundary value analysis
• Boundary 100 C
• Boundary values:
• 100 C, 101 C or
• 100.0 C, 100.1 C
Boundary value analysis: Example 2
• Exam pass
• Pass limit: 40%
• Boudary values:
• 39%, 40%, for pass
If you are a new customer and you want to open a credit card
account then there are three conditions:
•first you will get a 15% discount on all your purchases today,
•second if you are an existing customer and you hold a loyalty card, you get a 10%
discount
•third if you have a coupon, you can get 20% off today (but it can’t be used with the ‘new
customer’ discount).
Existing customer T T F F T T F F
Loyalty card (10%)
Coupon (20%) T F T F T F T F
Actions
Discount 15% - - - YES - - - -
Discount 10% - - - - YES YES - -
Discount 20% - - YES - YES - YES -
Total Discount (%) x x 20 15 30 10 20 0
Black-Box Techniques
State transition testing
State transition testing
Events
– Can generate output
A B C D E
S1 S2 - - - S5
S2 - - - - S3 / X
S3 - - S4 - -
S4 - - - S2 -
S5 - S1 - - -
State transition diagrams
1. ABCDE
2. FEABC
3. ABCEF
4. EFADC
Black-Box Techniques
Use Case Testing
Use cases
Exceptions:
• If card is invalid: Error message and card is rejected
• If PIN is invalid: Error message, user can re-type the PIN
• If PIN is typed invalid 3 times: Error message and ATM eat card
Use case testing: Example
Main Step Description
Success
Scenario 1 A: Inserts card
A: Actor
2 S: Validates card and asks for PIN
S: System
3 A: Enters PIN
4 S: Validates PIN
Statement Coverage
Branch/Decision Coverage
Path Coverage
White-Box Techniques
Statement coverage
Statement Coverage
Suppose you have a bank account that offers variable interest rates:
• 0.5% for the first $1,000 credit;
• 1% for the next $1,000;
• 1.5% for the rest.
If you wanted to check that the bank was handling your account
correctly what valid input partitions might you use?
Equivalence partitioning: Exercise 3