Skip to content

MaiHamed/Software-Testing-Banking-System

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏦 Account Management System — Software Testing Project

CSE341 – Software Testing, Validation and Verification
Faculty of Engineering, Ain Shams University


👥 Team

Name ID
Mai Hamed 23P0261
Maryam Hamdy 23P0260
Nourhan Hesham 23P0442
Shahd Ali 23P0436
Hania Mahrouse 23P0033
Ziad Mohamed 2200792

📌 Overview

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)

🗂️ Project Structure

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

⚙️ System Components

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

🧪 Testing Strategy

1. Black-Box Testing

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/


2. White-Box Testing

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/


3. State-Based Testing

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/


4. Integration Testing

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


5. GUI Testing

Manual testing of the Swing interface:

  • Input validation and error messages
  • Balance and status display accuracy
  • Button behavior and user feedback

📄 Artifacts: Deliverables/UI/


6. Code Coverage (JaCoCo)

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


7. Test-Driven Development (TDD)

Applied during CreditScoreFeature development:

  1. Write failing test
  2. Implement minimum code to pass
  3. Refactor while keeping tests green

📄 Artifacts: Deliverables/TDD/, CreditScoreTDDTest.java


🚀 How to Run

Prerequisites

  • Java 11+
  • Maven

Run the Application

mvn compile
mvn exec:java -Dexec.mainClass="com.example.App"

Run All Tests

mvn test

Generate JaCoCo Coverage Report

mvn test jacoco:report
# Report at: target/site/jacoco/index.html

📊 Test Files Summary

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

📝 Key Takeaways

  • 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

About

Java banking system tested end-to-end with black-box, white-box, integration, GUI testing, and JaCoCo coverage analysis — built with a TDD approach.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors