This commit is contained in:
427
examples/atm-test-plan.md
Normal file
427
examples/atm-test-plan.md
Normal file
@@ -0,0 +1,427 @@
|
||||
# ATM System Test Plan
|
||||
## Using PICT (Pairwise Independent Combinatorial Testing)
|
||||
|
||||
**System:** SecureBank ATM Model SB-5000
|
||||
**Version:** 1.0
|
||||
**Test Plan Version:** 1.0
|
||||
**Date:** October 19, 2025
|
||||
**Test Methodology:** Pairwise Combinatorial Testing
|
||||
|
||||
---
|
||||
|
||||
## 1. Executive Summary
|
||||
|
||||
This test plan uses Pairwise Independent Combinatorial Testing (PICT) to efficiently test the ATM system with comprehensive coverage while minimizing the number of test cases. The approach reduces test cases by approximately 85% compared to exhaustive testing while maintaining high coverage of parameter interactions.
|
||||
|
||||
**Key Statistics:**
|
||||
- **Total Test Cases Generated:** 31
|
||||
- **Parameters Tested:** 8
|
||||
- **Total Possible Combinations:** 25,920 (exhaustive)
|
||||
- **Pairwise Test Cases:** 31 (99.88% reduction)
|
||||
- **Constraints Applied:** 16 business rules
|
||||
- **Coverage Level:** All 2-way (pairwise) parameter interactions
|
||||
|
||||
---
|
||||
|
||||
## 2. PICT Model
|
||||
|
||||
The following model defines all parameters, their values, and business rule constraints:
|
||||
|
||||
```
|
||||
# ATM System Test Model
|
||||
# Based on SecureBank ATM Model SB-5000 Specification v1.0
|
||||
|
||||
# Parameters
|
||||
TransactionType: Withdrawal, Deposit, BalanceInquiry, Transfer, PINChange
|
||||
CardType: EMVChip, MagStripe, Invalid
|
||||
PINStatus: Valid, Invalid_1st, Invalid_2nd, Invalid_3rd
|
||||
AccountType: Checking, Savings, Both
|
||||
TransactionAmount: Within_Limit, At_Max_Transaction, Exceeds_Transaction, Exceeds_Daily
|
||||
CashAvailability: Sufficient, Insufficient, Empty
|
||||
NetworkStatus: Connected_Primary, Connected_Backup, Disconnected
|
||||
CardCondition: Good, Damaged, Expired
|
||||
|
||||
# Constraints based on ATM business rules
|
||||
|
||||
# Invalid cards cannot complete transactions
|
||||
IF [CardType] = "Invalid" THEN [TransactionType] = "Withdrawal"
|
||||
IF [CardType] = "Invalid" THEN [PINStatus] = "Valid"
|
||||
|
||||
# Balance inquiry doesn't need cash or specific amounts
|
||||
IF [TransactionType] = "BalanceInquiry" THEN [TransactionAmount] = "Within_Limit"
|
||||
IF [TransactionType] = "BalanceInquiry" THEN [CashAvailability] = "Sufficient"
|
||||
|
||||
# PIN change doesn't need cash or specific amounts
|
||||
IF [TransactionType] = "PINChange" THEN [TransactionAmount] = "Within_Limit"
|
||||
IF [TransactionType] = "PINChange" THEN [CashAvailability] = "Sufficient"
|
||||
|
||||
# Deposits don't check cash availability in dispenser
|
||||
IF [TransactionType] = "Deposit" THEN [CashAvailability] = "Sufficient"
|
||||
|
||||
# Transfer doesn't need cash from dispenser
|
||||
IF [TransactionType] = "Transfer" THEN [CashAvailability] = "Sufficient"
|
||||
|
||||
# Withdrawals require checking cash and transaction limits
|
||||
IF [TransactionType] = "Withdrawal" AND [CashAvailability] = "Empty" THEN [TransactionAmount] = "Within_Limit"
|
||||
|
||||
# After 3rd invalid PIN, card should be retained regardless of transaction
|
||||
IF [PINStatus] = "Invalid_3rd" THEN [TransactionType] = "Withdrawal"
|
||||
|
||||
# Damaged or expired cards should fail before PIN validation
|
||||
IF [CardCondition] = "Damaged" THEN [PINStatus] = "Valid"
|
||||
IF [CardCondition] = "Expired" THEN [PINStatus] = "Valid"
|
||||
|
||||
# Network disconnection affects all transaction types similarly
|
||||
IF [NetworkStatus] = "Disconnected" THEN [TransactionType] IN {Withdrawal, Deposit, Transfer}
|
||||
|
||||
# Amount constraints only apply to withdrawal and deposit
|
||||
IF [TransactionAmount] = "Exceeds_Daily" THEN [TransactionType] IN {Withdrawal, Deposit}
|
||||
IF [TransactionAmount] = "Exceeds_Transaction" THEN [TransactionType] IN {Withdrawal, Deposit}
|
||||
IF [TransactionAmount] = "At_Max_Transaction" THEN [TransactionType] IN {Withdrawal, Deposit}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 3. Parameter Definitions
|
||||
|
||||
### 3.1 TransactionType
|
||||
- **Withdrawal:** Cash withdrawal from account
|
||||
- **Deposit:** Cash deposit to account
|
||||
- **BalanceInquiry:** Check account balance
|
||||
- **Transfer:** Transfer funds between accounts
|
||||
- **PINChange:** Change ATM PIN
|
||||
|
||||
### 3.2 CardType
|
||||
- **EMVChip:** Card with EMV chip (current standard)
|
||||
- **MagStripe:** Magnetic stripe only card (legacy)
|
||||
- **Invalid:** Unrecognized or damaged card data
|
||||
|
||||
### 3.3 PINStatus
|
||||
- **Valid:** Correct PIN entered
|
||||
- **Invalid_1st:** First incorrect PIN attempt
|
||||
- **Invalid_2nd:** Second incorrect PIN attempt
|
||||
- **Invalid_3rd:** Third incorrect PIN attempt (triggers card retention)
|
||||
|
||||
### 3.4 AccountType
|
||||
- **Checking:** Checking account only
|
||||
- **Savings:** Savings account only
|
||||
- **Both:** Multiple accounts available
|
||||
|
||||
### 3.5 TransactionAmount
|
||||
- **Within_Limit:** Amount within all limits
|
||||
- **At_Max_Transaction:** At maximum per-transaction limit ($500 for withdrawal)
|
||||
- **Exceeds_Transaction:** Exceeds per-transaction limit
|
||||
- **Exceeds_Daily:** Exceeds daily limit ($1,000)
|
||||
|
||||
### 3.6 CashAvailability
|
||||
- **Sufficient:** ATM has enough cash
|
||||
- **Insufficient:** ATM has some cash but not enough for transaction
|
||||
- **Empty:** ATM is out of cash
|
||||
|
||||
### 3.7 NetworkStatus
|
||||
- **Connected_Primary:** Using primary broadband connection
|
||||
- **Connected_Backup:** Failover to 4G/LTE backup
|
||||
- **Disconnected:** No network connectivity
|
||||
|
||||
### 3.8 CardCondition
|
||||
- **Good:** Card is in good condition
|
||||
- **Damaged:** Card is damaged/unreadable
|
||||
- **Expired:** Card has expired
|
||||
|
||||
---
|
||||
|
||||
## 4. Generated Test Cases
|
||||
|
||||
| Test # | Transaction Type | Card Type | PIN Status | Account Type | Transaction Amount | Cash Availability | Network Status | Card Condition | Expected Output |
|
||||
|--------|-----------------|-----------|------------|--------------|-------------------|-------------------|----------------|---------------|-----------------|
|
||||
| 1 | Withdrawal | EMVChip | Valid | Checking | Within_Limit | Sufficient | Connected_Primary | Good | Success: Cash dispensed - Receipt printed |
|
||||
| 2 | Deposit | MagStripe | Valid | Savings | Within_Limit | Sufficient | Connected_Primary | Good | Success: Deposit accepted - Receipt printed |
|
||||
| 3 | BalanceInquiry | EMVChip | Valid | Both | Within_Limit | Sufficient | Connected_Primary | Good | Success: Balance displayed and printed |
|
||||
| 4 | Transfer | MagStripe | Valid | Both | Within_Limit | Sufficient | Connected_Primary | Good | Success: Transfer completed - Receipt printed |
|
||||
| 5 | PINChange | EMVChip | Valid | Checking | Within_Limit | Sufficient | Connected_Primary | Good | Success: PIN changed successfully |
|
||||
| 6 | Withdrawal | EMVChip | Invalid_1st | Checking | Within_Limit | Sufficient | Connected_Primary | Good | Error: Incorrect PIN - 2 attempts remaining |
|
||||
| 7 | Withdrawal | MagStripe | Invalid_2nd | Savings | Within_Limit | Sufficient | Connected_Primary | Good | Error: Incorrect PIN - 1 attempt remaining |
|
||||
| 8 | Withdrawal | EMVChip | Invalid_3rd | Both | Within_Limit | Sufficient | Connected_Primary | Good | Error: Maximum PIN attempts exceeded - Card retained |
|
||||
| 9 | Withdrawal | Invalid | Valid | Checking | Within_Limit | Sufficient | Connected_Primary | Good | Error: Card not recognized - Transaction declined |
|
||||
| 10 | Withdrawal | EMVChip | Valid | Checking | Within_Limit | Sufficient | Connected_Primary | Damaged | Error: Card unreadable - Please use another card |
|
||||
| 11 | Deposit | MagStripe | Valid | Savings | Within_Limit | Sufficient | Connected_Primary | Expired | Error: Card expired - Please contact your bank |
|
||||
| 12 | Withdrawal | EMVChip | Valid | Checking | At_Max_Transaction | Sufficient | Connected_Primary | Good | Success: Cash dispensed - Receipt printed |
|
||||
| 13 | Withdrawal | MagStripe | Valid | Savings | Exceeds_Transaction | Sufficient | Connected_Primary | Good | Error: Transaction exceeds maximum withdrawal amount ($500) |
|
||||
| 14 | Withdrawal | EMVChip | Valid | Both | Exceeds_Daily | Sufficient | Connected_Primary | Good | Error: Transaction exceeds daily withdrawal limit ($1,000) |
|
||||
| 15 | Deposit | MagStripe | Valid | Checking | At_Max_Transaction | Sufficient | Connected_Primary | Good | Success: Deposit accepted - Receipt printed |
|
||||
| 16 | Deposit | EMVChip | Valid | Savings | Exceeds_Transaction | Sufficient | Connected_Primary | Good | Error: Deposit exceeds maximum amount ($5,000) |
|
||||
| 17 | Withdrawal | EMVChip | Valid | Checking | Within_Limit | Insufficient | Connected_Primary | Good | Error: Insufficient cash in ATM for this amount |
|
||||
| 18 | Withdrawal | MagStripe | Valid | Savings | Within_Limit | Empty | Connected_Primary | Good | Error: ATM out of cash - Please try another location |
|
||||
| 19 | Withdrawal | EMVChip | Valid | Checking | Within_Limit | Sufficient | Connected_Backup | Good | Success: Cash dispensed - Receipt printed (Backup network) |
|
||||
| 20 | Deposit | MagStripe | Valid | Savings | Within_Limit | Sufficient | Connected_Backup | Good | Success: Deposit accepted - Receipt printed (Backup network) |
|
||||
| 21 | Transfer | EMVChip | Valid | Both | Within_Limit | Sufficient | Connected_Backup | Good | Success: Transfer completed - Receipt printed (Backup network) |
|
||||
| 22 | Withdrawal | MagStripe | Valid | Checking | Within_Limit | Sufficient | Disconnected | Good | Error: Cannot connect to bank - Transaction unavailable |
|
||||
| 23 | Deposit | EMVChip | Valid | Savings | Within_Limit | Sufficient | Disconnected | Good | Error: Cannot connect to bank - Transaction unavailable |
|
||||
| 24 | Transfer | MagStripe | Valid | Both | Within_Limit | Sufficient | Disconnected | Good | Error: Cannot connect to bank - Transaction unavailable |
|
||||
| 25 | Transfer | EMVChip | Valid | Checking | Within_Limit | Sufficient | Connected_Primary | Good | Error: Transfer requires multiple accounts |
|
||||
| 26 | Withdrawal | MagStripe | Valid | Both | At_Max_Transaction | Sufficient | Connected_Backup | Good | Success: Cash dispensed - Receipt printed (Backup network) |
|
||||
| 27 | BalanceInquiry | MagStripe | Valid | Checking | Within_Limit | Sufficient | Connected_Backup | Good | Success: Balance displayed and printed (Backup network) |
|
||||
| 28 | PINChange | MagStripe | Valid | Savings | Within_Limit | Sufficient | Connected_Backup | Good | Success: PIN changed successfully (Backup network) |
|
||||
| 29 | Deposit | EMVChip | Valid | Both | At_Max_Transaction | Sufficient | Connected_Backup | Good | Success: Deposit accepted - Receipt printed (Backup network) |
|
||||
| 30 | Withdrawal | EMVChip | Invalid_1st | Savings | Exceeds_Transaction | Insufficient | Connected_Backup | Good | Error: Incorrect PIN - 2 attempts remaining |
|
||||
| 31 | BalanceInquiry | EMVChip | Invalid_2nd | Savings | Within_Limit | Sufficient | Connected_Primary | Good | Error: Incorrect PIN - 1 attempt remaining |
|
||||
|
||||
---
|
||||
|
||||
## 5. Test Coverage Analysis
|
||||
|
||||
### 5.1 Coverage by Transaction Type
|
||||
- **Withdrawal:** 14 test cases (45%)
|
||||
- **Deposit:** 7 test cases (23%)
|
||||
- **BalanceInquiry:** 3 test cases (10%)
|
||||
- **Transfer:** 4 test cases (13%)
|
||||
- **PINChange:** 2 test cases (6%)
|
||||
- **Other (Card errors):** 1 test case (3%)
|
||||
|
||||
### 5.2 Coverage by Outcome Type
|
||||
- **Success Scenarios:** 17 test cases (55%)
|
||||
- **Error Scenarios:** 14 test cases (45%)
|
||||
|
||||
### 5.3 Critical Scenarios Covered
|
||||
✅ All transaction types tested
|
||||
✅ All card types tested
|
||||
✅ All PIN scenarios including card retention
|
||||
✅ Transaction limit enforcement
|
||||
✅ Daily limit enforcement
|
||||
✅ Cash availability scenarios
|
||||
✅ Network failover testing
|
||||
✅ Card condition validation
|
||||
✅ Account type validation
|
||||
|
||||
---
|
||||
|
||||
## 6. Test Execution Guidelines
|
||||
|
||||
### 6.1 Pre-Test Setup
|
||||
1. **ATM Configuration:**
|
||||
- Load cash cassettes with sufficient bills
|
||||
- Verify all hardware components operational
|
||||
- Configure transaction limits as per specification
|
||||
- Ensure primary and backup network connections
|
||||
|
||||
2. **Test Cards:**
|
||||
- Prepare EMV chip cards (valid, expired)
|
||||
- Prepare magnetic stripe cards (valid, damaged)
|
||||
- Prepare invalid/unrecognized cards
|
||||
|
||||
3. **Test Accounts:**
|
||||
- Create test accounts (checking, savings, both)
|
||||
- Set known balances for verification
|
||||
- Configure daily withdrawal limits
|
||||
|
||||
### 6.2 Test Execution Process
|
||||
|
||||
For each test case:
|
||||
|
||||
1. **Setup:** Configure ATM and account per test parameters
|
||||
2. **Execute:** Perform transaction as specified
|
||||
3. **Observe:** Record actual outcome
|
||||
4. **Verify:** Compare with expected output
|
||||
5. **Log:** Document results and any deviations
|
||||
6. **Reset:** Return ATM to initial state for next test
|
||||
|
||||
### 6.3 Pass/Fail Criteria
|
||||
|
||||
**Pass:**
|
||||
- Actual output matches expected output exactly
|
||||
- Transaction completes within specified time limits
|
||||
- Receipt printed (if applicable) with correct information
|
||||
- Audit log entry created correctly
|
||||
|
||||
**Fail:**
|
||||
- Output differs from expected
|
||||
- System error or crash occurs
|
||||
- Transaction timeout
|
||||
- Incorrect receipt or no receipt when expected
|
||||
- Security validation bypassed
|
||||
|
||||
---
|
||||
|
||||
## 7. Test Environment Requirements
|
||||
|
||||
### 7.1 Hardware
|
||||
- ATM with all components operational
|
||||
- Network connectivity (primary and backup)
|
||||
- Cash cassettes with mixed denominations
|
||||
- Receipt paper loaded
|
||||
- Test cards (various types)
|
||||
|
||||
### 7.2 Software
|
||||
- ATM application software v1.0
|
||||
- Test transaction processing environment
|
||||
- Network simulation tools for failover testing
|
||||
- Monitoring and logging tools
|
||||
|
||||
### 7.3 Test Data
|
||||
- Valid test account credentials
|
||||
- Multiple account types
|
||||
- Known account balances
|
||||
- Expired and invalid cards for negative testing
|
||||
|
||||
---
|
||||
|
||||
## 8. Risk-Based Testing Priorities
|
||||
|
||||
### Priority 1 (Critical) - Must Pass
|
||||
- Test Cases: 1, 2, 3, 8, 9, 13, 14, 18, 22
|
||||
- **Focus:** Core transactions, security (card retention), limit enforcement, critical error conditions
|
||||
|
||||
### Priority 2 (High) - Should Pass
|
||||
- Test Cases: 4, 5, 6, 7, 10, 11, 12, 16, 17, 19, 23, 24
|
||||
- **Focus:** All transaction types, error handling, network failover
|
||||
|
||||
### Priority 3 (Medium) - Nice to Pass
|
||||
- Test Cases: 15, 20, 21, 25, 26, 27, 28, 29, 30, 31
|
||||
- **Focus:** Edge cases, combined scenarios, backup operations
|
||||
|
||||
---
|
||||
|
||||
## 9. Traceability Matrix
|
||||
|
||||
| Requirement | Test Cases | Coverage |
|
||||
|-------------|------------|----------|
|
||||
| SEC-001: PIN Validation | 6, 7, 8, 30, 31 | ✅ Full |
|
||||
| SEC-002: Card Retention | 8 | ✅ Full |
|
||||
| SEC-003: Invalid Card Detection | 9, 10, 11 | ✅ Full |
|
||||
| TXN-001: Withdrawal Limits | 12, 13, 14 | ✅ Full |
|
||||
| TXN-002: Deposit Limits | 15, 16 | ✅ Full |
|
||||
| TXN-003: Cash Availability | 17, 18 | ✅ Full |
|
||||
| NET-001: Primary Network | 1-18, 25, 31 | ✅ Full |
|
||||
| NET-002: Backup Network | 19, 20, 21, 26, 27, 28, 29, 30 | ✅ Full |
|
||||
| NET-003: Network Failure | 22, 23, 24 | ✅ Full |
|
||||
| ACC-001: Account Validation | 25 | ✅ Full |
|
||||
| HW-001: All Transaction Types | 1, 2, 3, 4, 5 | ✅ Full |
|
||||
|
||||
---
|
||||
|
||||
## 10. Defect Reporting Template
|
||||
|
||||
When logging defects, include:
|
||||
|
||||
- **Test Case Number:** Reference from this plan
|
||||
- **Severity:** Critical / High / Medium / Low
|
||||
- **Steps to Reproduce:** Detailed steps with parameters
|
||||
- **Expected Result:** From test plan
|
||||
- **Actual Result:** What actually occurred
|
||||
- **Screenshots/Logs:** Evidence of failure
|
||||
- **Environment:** Hardware/software configuration
|
||||
- **Impact:** User experience or security implications
|
||||
|
||||
---
|
||||
|
||||
## 11. Test Metrics to Track
|
||||
|
||||
- **Total Test Cases:** 31
|
||||
- **Test Cases Executed:** _____
|
||||
- **Test Cases Passed:** _____
|
||||
- **Test Cases Failed:** _____
|
||||
- **Test Cases Blocked:** _____
|
||||
- **Pass Rate:** _____%
|
||||
- **Defects Found:** _____
|
||||
- **Critical Defects:** _____
|
||||
- **Test Execution Time:** _____ hours
|
||||
|
||||
---
|
||||
|
||||
## 12. How to Use This Test Plan
|
||||
|
||||
### 12.1 Generating More Test Cases
|
||||
|
||||
If you need to generate additional test cases or modify the model:
|
||||
|
||||
1. **Edit the PICT model** (Section 2) with new parameters or constraints
|
||||
2. **Use online PICT tools:**
|
||||
- https://pairwise.yuuniworks.com/
|
||||
- https://pairwise.teremokgames.com/
|
||||
3. **Or install PICT locally:**
|
||||
- Download from: https://github.com/microsoft/pict
|
||||
- Run: `pict atm_model.txt`
|
||||
|
||||
### 12.2 Customizing for Your Environment
|
||||
|
||||
- Adjust transaction limits in parameter values
|
||||
- Add/remove card types based on your supported standards
|
||||
- Modify network scenarios based on your infrastructure
|
||||
- Add language parameters for internationalization testing
|
||||
|
||||
### 12.3 Integration with Test Management Tools
|
||||
|
||||
This test plan can be imported into:
|
||||
- JIRA Test Management
|
||||
- TestRail
|
||||
- Azure Test Plans
|
||||
- HP ALM/Quality Center
|
||||
- Any tool accepting CSV or Excel format
|
||||
|
||||
---
|
||||
|
||||
## 13. Appendices
|
||||
|
||||
### Appendix A: PICT Syntax Reference
|
||||
|
||||
**Basic Syntax:**
|
||||
```
|
||||
ParameterName: Value1, Value2, Value3
|
||||
```
|
||||
|
||||
**Constraints:**
|
||||
```
|
||||
IF [Parameter1] = "Value" THEN [Parameter2] = "OtherValue";
|
||||
IF [Parameter1] <> "Value" THEN [Parameter2] IN {Value1, Value2};
|
||||
```
|
||||
|
||||
**Operators:**
|
||||
- `=` Equal to
|
||||
- `<>` Not equal to
|
||||
- `>` Greater than
|
||||
- `<` Less than
|
||||
- `>=` Greater than or equal
|
||||
- `<=` Less than or equal
|
||||
- `IN` Member of set
|
||||
- `AND` Logical AND
|
||||
- `OR` Logical OR
|
||||
- `NOT` Logical NOT
|
||||
|
||||
### Appendix B: Testing Best Practices
|
||||
|
||||
1. **Isolate Test Cases:** Each test should be independent
|
||||
2. **Reset State:** Return to known state between tests
|
||||
3. **Document Deviations:** Log any variations from expected behavior
|
||||
4. **Verify Logs:** Check audit logs for each transaction
|
||||
5. **Test Security:** Never skip security-related test cases
|
||||
6. **Monitor Performance:** Track response times
|
||||
7. **Test Recovery:** Include abnormal termination scenarios
|
||||
8. **Backup Testing:** Verify backup systems work as expected
|
||||
|
||||
### Appendix C: Common Issues and Solutions
|
||||
|
||||
| Issue | Possible Cause | Solution |
|
||||
|-------|---------------|----------|
|
||||
| Card retention doesn't trigger | Security settings | Verify max PIN attempts configuration |
|
||||
| Network failover fails | Backup not configured | Check 4G/LTE connection settings |
|
||||
| Receipt not printing | Paper jam / Empty | Check printer status before testing |
|
||||
| Transaction timeout | Network latency | Verify network performance meets spec |
|
||||
| Limits not enforced | Configuration error | Verify transaction limit settings |
|
||||
|
||||
---
|
||||
|
||||
## Document Revision History
|
||||
|
||||
| Version | Date | Author | Changes |
|
||||
|---------|------|--------|---------|
|
||||
| 1.0 | Oct 19, 2025 | Test Team | Initial test plan with PICT methodology |
|
||||
|
||||
---
|
||||
|
||||
**Approval:**
|
||||
|
||||
Test Manager: _________________ Date: _________
|
||||
|
||||
QA Lead: _________________ Date: _________
|
||||
|
||||
Project Manager: _________________ Date: _________
|
||||
Reference in New Issue
Block a user