Skip to content

Latest commit

 

History

History
106 lines (88 loc) · 3.75 KB

File metadata and controls

106 lines (88 loc) · 3.75 KB

✅ ADOPTER MANAGEMENT DASHBOARD - SEARCH BY NAME TESTING REPORT

🎯 FUNCTIONALITY TESTED: Option 4 - "Search Adopter by Name"

📋 User Navigation Path:

1. Admin Login (admin1/admin123)
   ↓
2. Main Menu → Adopter Management
   ↓
3. Adopter Dashboard → Option 4: Search Adopter by Name
   ↓
4. Enter search term → View LIKE search results

🔍 LIKE Search Implementation:

  • Method: AdopterCRUD.searchAdoptersByName(String searchTerm)
  • SQL Query: SELECT * FROM tbl_adopter WHERE adopter_name LIKE ? ORDER BY adopter_name
  • Pattern: %searchTerm% (automatic wildcard wrapping)
  • Case Sensitivity: Case-insensitive (MySQL default)

🧪 TEST RESULTS:

✅ Test 1: Search for "John"

  • SQL: adopter_name LIKE '%John%'
  • Results: Found 2 adopters
    • Alice Johnson (ID: 1)
    • John Adopter (ID: 3)
  • Status: PASS ✅

✅ Test 2: Search for "Alice"

  • SQL: adopter_name LIKE '%Alice%'
  • Results: Found 1 adopter
    • Alice Johnson (ID: 1)
  • Status: PASS ✅

✅ Test 3: Search for "A" (Broad Search)

  • SQL: adopter_name LIKE '%A%'
  • Results: Found 4 adopters
    • Alice Johnson (ID: 1)
    • John Adopter (ID: 3)
    • Marky Cruz (ID: 2)
    • Theresa (ID: 4)
  • Status: PASS ✅

✅ Test 4: Search for "Johnson"

  • SQL: adopter_name LIKE '%Johnson%'
  • Results: Found 1 adopter
    • Alice Johnson (ID: 1)
  • Status: PASS ✅

✅ Test 5: Search for "Mark"

  • SQL: adopter_name LIKE '%Mark%'
  • Results: Found 1 adopter
    • Marky Cruz (ID: 2)
  • Status: PASS ✅

✅ Test 6: Search for "xyz" (Non-existent)

  • SQL: adopter_name LIKE '%xyz%'
  • Results: No adopters found
  • Message: "No adopters found matching: xyz"
  • Status: PASS ✅ (Proper empty result handling)

📊 Current Database State:

ID | Name           | Contact      | Email                   | Username
---|----------------|--------------|-------------------------|----------
1  | Alice Johnson  | 09171234567  | alice@example.com       | alicej
2  | Marky Cruz     | 0999999999   | mark@example.com        | markc
3  | John Adopter   | 09171111111  | adopter1@example.com    | adopter1
4  | Theresa        | 09693764567  | ginatheresa@gmail.com   | ginathis

🎨 Dashboard Display Format:

Search Results:
ID    Name                      Contact         Email                          
---------------------------------------------------------------------------
1     Alice Johnson             09171234567     alice@example.com              
3     John Adopter              09171111111     adopter1@example.com           

VERIFICATION CHECKLIST:

  • Menu Access: Option 4 displays correctly in dashboard
  • Input Prompt: "Enter name to search: " works properly
  • LIKE Query: SQL pattern %searchTerm% implemented correctly
  • Partial Matching: Finds names containing the search term
  • Case Insensitive: Works regardless of case
  • Multiple Results: Displays all matching adopters
  • Formatted Output: Professional table format
  • Empty Results: Proper message for no matches
  • Error Handling: Exception handling implemented
  • Database Connection: Connects successfully for each search

🎉 FINAL STATUS: FULLY FUNCTIONAL

The Adopter Management Dashboard → Option 4: "Search Adopter by Name" is 100% operational with:

  • LIKE-based partial matching using %wildcards%
  • Professional user interface with formatted results
  • Robust error handling and validation
  • Database integration working correctly
  • Multiple search scenarios tested and verified

The feature is ready for production use! 🚀