CSE341 – Software Testing, Validation and Verification
Faculty of Engineering, Ain Shams University
| Name | ID |
|---|---|
| Mai Hamed | 23P0261 |
| Maryam Hamdy | 23P0260 |
| Nourhan Hesham | 23P0442 |
| Shahd Ali | 23P0436 |
| Hania Mahrouse | 23P0033 |
| Ziad Mohamed | 2200792 |
A Java-based Account Management System that simulates core banking operations — deposits, withdrawals, transfers, and credit score evaluation — tested comprehensively using multiple software testing techniques.
The goal is not just to build the system, but to validate it rigorously using:
- Black-Box Testing
- White-Box Testing (with CFG analysis)
- State-Based Testing
- Integration Testing
- GUI Testing
- Code Coverage (JaCoCo)
- Test-Driven Development (TDD)
TESTING_PROJECT/
│
├── Deliverables/
│ ├── BlackBox/ # Black-box test cases & reports
│ ├── StateBased/ # State transition test artifacts
│ ├── TDD/ # TDD process documentation
│ ├── UI/ # GUI test checklist & bug list
│ ├── WhiteBox/ # CFG diagrams & path coverage
│ └── Code Coverage Report.docx
│
├── GUI_SS/ # GUI screenshots
│
├── Report/
│ └── SWTesting_Project.pdf # Full project report
│
└── src/
├── main/java/com/example/
│ ├── Account.java
│ ├── AccountController.java
│ ├── AccountStatus.java
│ ├── App.java
│ ├── BankSystemGUI.java
│ ├── CreditScoreFeature.java
│ ├── CreditService.java
│ └── TransactionProcessor.java
│
└── test/java/com/example/
├── AppTest.java
├── BoundaryValueTests.java
├── CreditScoreTDDTest.java
├── IntegrationStateTests.java
├── IntegrationTests.java
├── PathCoverageTests.java
├── StateTransitionTests.java
├── TransactionProcessorTest.java
└── WhiteBoxTest.java
| Class | Responsibility |
|---|---|
Account |
Manages balance, account status, and validations |
AccountController |
Bridge between GUI and business logic |
AccountStatus |
Enum for account states (Active, Closed, Suspended) |
TransactionProcessor |
Handles deposit, withdrawal, and transfer logic |
CreditScoreFeature |
Calculates and evaluates client credit scores |
CreditService |
Credit score service layer |
BankSystemGUI |
Swing-based graphical user interface |
App |
Application entry point |
Tests designed purely from functional requirements — no knowledge of internal code.
- Valid and invalid input testing
- Boundary value analysis
- Functional correctness for all account operations
📄 Artifacts: Deliverables/BlackBox/
Tests designed from internal logic and control flow.
- Branch coverage for deposit, withdrawal, transfer
- Control Flow Graphs (CFGs) for all critical methods
- Path-based test case design
CFG: Deposit
status == Closed OR amount <= 0?
├── TRUE → return false
└── FALSE → balance += amount → return true
CFG: Withdraw
status == Closed OR Suspended?
├── TRUE → return false
└── FALSE → amount > balance?
├── YES → return false
└── NO → balance -= amount → return true
📄 Artifacts: Deliverables/WhiteBox/
Tests based on account state transitions.
| From State | Event | To State |
|---|---|---|
| Active | Close account | Closed |
| Active | Suspend | Suspended |
| Suspended | Reactivate | Active |
| Closed | Any transaction | Rejected |
📄 Artifacts: Deliverables/StateBased/
Verifies interactions between components:
- GUI → Controller → Business Logic flow
- Multi-account transaction processing
- Credit score integration with account data
📄 Test files: IntegrationTests.java, IntegrationStateTests.java
Manual testing of the Swing interface:
- Input validation and error messages
- Balance and status display accuracy
- Button behavior and user feedback
📄 Artifacts: Deliverables/UI/
| Class | Coverage Level |
|---|---|
Account |
✅ High |
TransactionProcessor |
✅ High |
CreditScoreFeature |
✅ High |
AccountController |
🟡 Medium |
BankSystemGUI |
🔴 Low (event-driven) |
App |
🔴 Low (entry point) |
GUI classes are low due to event-driven execution — covered manually.
📄 Report: Deliverables/Code Coverage Report.docx
Applied during CreditScoreFeature development:
- Write failing test
- Implement minimum code to pass
- Refactor while keeping tests green
📄 Artifacts: Deliverables/TDD/, CreditScoreTDDTest.java
- Java 11+
- Maven
mvn compile
mvn exec:java -Dexec.mainClass="com.example.App"mvn testmvn test jacoco:report
# Report at: target/site/jacoco/index.html| Test File | Testing Type |
|---|---|
BoundaryValueTests.java |
Black-Box – Boundary Value |
WhiteBoxTest.java |
White-Box – Path Coverage |
PathCoverageTests.java |
White-Box – CFG Paths |
StateTransitionTests.java |
State-Based |
IntegrationTests.java |
Integration |
IntegrationStateTests.java |
Integration + State |
TransactionProcessorTest.java |
Unit – Transaction Logic |
CreditScoreTDDTest.java |
TDD – Credit Score |
AppTest.java |
Smoke Test |
- Combining multiple testing techniques gives significantly better coverage than any single approach
- GUI code is inherently difficult to unit-test — manual testing fills the gap
- TDD forces cleaner, more testable architecture from the start
- JaCoCo coverage numbers should be interpreted in context — low GUI coverage is expected and documented
Made with ☕ by Team 19 · Ain Shams University · 2025