Skip to content

Latest commit

 

History

History
286 lines (224 loc) · 6.79 KB

File metadata and controls

286 lines (224 loc) · 6.79 KB

XO Game - Test Execution Document

Test Date: 2025-11-07 Tester: Claude Code Build: main branch (latest commit) Platform: Chrome Browser (Web)


Test Cases

TC-01: Basic Game Start and UI Load

Priority: Critical Objective: Verify the game loads correctly with all UI elements visible

Steps:

  1. Open the game in Chrome browser
  2. Verify splash screen appears
  3. Verify home screen loads
  4. Check all UI elements are visible (board, status, controls)

Expected Result:

  • Game loads without errors
  • All UI elements render properly
  • No console errors

Status: ✅ PASS Result: UI loads and renders correctly with no console errors. All elements visible and functional. Bugs Found: None (BUG-01 and BUG-02 have been resolved) Notes:

  • Fixed BUG-01: Implemented web-compatible database using shared_preferences
  • Fixed BUG-02: Disabled sound playback on web platform until files are added
  • Game loads cleanly on Chrome with no errors

TC-02: Player vs AI - Default Game Flow

Priority: Critical Objective: Verify basic gameplay against AI works correctly

Steps:

  1. Ensure Game Mode is set to "Player vs AI"
  2. Click any cell on the board
  3. Wait for AI to make a move
  4. Continue playing until game ends (win/lose/draw)
  5. Verify correct winner is announced

Expected Result:

  • Player can make moves (X)
  • AI responds with moves (O)
  • Game detects win/lose/draw correctly
  • Confetti animation plays on win

Status: ⏳ PENDING Result: Bugs Found: Notes:


TC-03: Player vs Player Mode

Priority: High Objective: Verify two players can play against each other

Steps:

  1. Change Game Mode to "Player vs Player"
  2. Player 1 clicks a cell (should place X)
  3. Player 2 clicks a different cell (should place O)
  4. Continue alternating moves
  5. Verify game ends correctly

Expected Result:

  • Both players can place marks
  • Turn alternates between X and O
  • No AI moves occur
  • Winner detection works

Status: ⏳ PENDING Result: Bugs Found: Notes:


TC-04: Undo/Redo Functionality

Priority: High Objective: Verify undo and redo buttons work correctly

Steps:

  1. Start a new game (PvP mode)
  2. Make 3-4 moves
  3. Click "Undo" button
  4. Verify last move is removed
  5. Click "Redo" button
  6. Verify move is restored

Expected Result:

  • Undo removes last move
  • Redo restores the move
  • Buttons are disabled when stacks are empty
  • Board state updates correctly

Status: ⏳ PENDING Result: Bugs Found: Notes:


TC-05: Timed Mode Functionality

Priority: High Objective: Verify timed mode countdown and timeout work

Steps:

  1. Enable "Timed Mode" toggle
  2. Set time limit to 10 seconds
  3. Start a new game
  4. Make one move and wait
  5. Observe timer countdown
  6. Let timer reach 0 without making a move

Expected Result:

  • Timer appears when timed mode is on
  • Countdown works (decrements every second)
  • Color changes based on urgency (green → amber → red)
  • Game ends with timeout when time runs out

Status: ⏳ PENDING Result: Bugs Found: Notes:


TC-06: Board Size Changes (3x3, 4x4, 5x5)

Priority: Medium Objective: Verify different board sizes work correctly

Steps:

  1. Change board size to 3x3
  2. Verify 9 cells appear
  3. Play a game to completion
  4. Change to 4x4, verify 16 cells
  5. Change to 5x5, verify 25 cells

Expected Result:

  • Board resizes correctly for each size
  • Win detection works for all sizes
  • Game logic adapts to board size

Status: ⏳ PENDING Result: Bugs Found: Notes:


TC-07: AI Difficulty Levels

Priority: Medium Objective: Verify different AI difficulty levels behave differently

Steps:

  1. Set AI difficulty to "Easy"
  2. Play a full game, observe AI behavior
  3. Set difficulty to "Medium"
  4. Play another game
  5. Set difficulty to "Hard"
  6. Play another game

Expected Result:

  • Easy AI makes suboptimal moves occasionally
  • Medium AI is balanced
  • Hard AI plays optimally
  • Noticeable difference in gameplay

Status: ⏳ PENDING Result: Bugs Found: Notes:


TC-08: Sound Effects Toggle

Priority: Medium Objective: Verify sound effects can be enabled/disabled

Steps:

  1. Go to Settings
  2. Enable "Sound Effects" toggle
  3. Make a move (should hear sound)
  4. Disable "Sound Effects"
  5. Make another move (should be silent)

Expected Result:

  • Toggle controls sound effects
  • Sounds play when enabled
  • No sounds when disabled
  • Setting persists across sessions

Status: ⏳ PENDING Result: Bugs Found: Notes:


TC-09: Game Reset Functionality

Priority: High Objective: Verify reset button clears the game

Steps:

  1. Start a game and make several moves
  2. Click the reset button (refresh icon)
  3. Verify board is cleared
  4. Verify status shows "Your Turn"
  5. Make a move to ensure game works

Expected Result:

  • Board clears completely
  • Game state resets
  • New game can start immediately
  • No leftover state from previous game

Status: ⏳ PENDING Result: Bugs Found: Notes:


TC-10: Win Detection and Celebration

Priority: Critical Objective: Verify win detection works for all patterns

Steps:

  1. Play a game and create a horizontal win (row)
  2. Reset and create a vertical win (column)
  3. Reset and create a diagonal win (top-left to bottom-right)
  4. Reset and create a diagonal win (top-right to bottom-left)
  5. Verify confetti animation plays each time

Expected Result:

  • All win patterns are detected correctly
  • Winning cells are highlighted
  • Confetti animation plays on player win
  • Win/lose sound effects play
  • Correct winner message displays

Status: ⏳ PENDING Result: Bugs Found: Notes:


Test Summary

Total Test Cases: 10 Passed: 1 Failed: 0 Blocked: 0 Pending: 9

Pass Rate: 10%


Bugs Found

Bug ID Severity Description Test Case Status
BUG-01 Critical Database service failed on web - sqflite not supported TC-01 ✅ FIXED
BUG-02 Medium Sound file 404 errors on web platform TC-01 ✅ FIXED
BUG-03 High Settings not persisting on web (player name, sound toggle, etc.) User Report ✅ FIXED
BUG-04 Critical Android build failure - file_picker v1 embedding incompatibility Android Emulator ✅ FIXED
BUG-05 Medium Unit test failures - null safety and incorrect draw board Unit Tests ✅ FIXED
BUG-06 Critical Android build failure - vibration v1 embedding incompatibility Android Emulator ✅ FIXED

Notes

  • Test execution started: [timestamp will be added]
  • Test execution completed: [timestamp will be added]
  • All tests performed on Chrome browser (latest version)
  • Game running on localhost:9300