# Testing Checklist - Multi-Name Sniper

## Pre-Flight Checks ✅

- [x] Syntax validation passed (`python3 -m py_compile sniper_gui_nuclear.py`)
- [x] Linting passed (no errors)
- [x] All imports available (httpx, PyQt5, etc.)
- [x] Documentation created (MULTI_NAME_GUIDE.md, IMPLEMENTATION_SUMMARY.md)
- [x] Example files created (accounts.example.txt)

## Basic Functionality Testing

### 1. GUI Launch
- [ ] Run `python3 sniper_gui_nuclear.py`
- [ ] GUI opens without errors
- [ ] All controls visible and interactive
- [ ] Dark theme renders correctly

### 2. Multi-Name Input
- [ ] Enter single username - works
- [ ] Enter multiple usernames (one per line) - parses correctly
- [ ] Invalid username handling (spaces, special chars)
- [ ] Empty name handling

### 3. Token Management
- [ ] Paste bearer tokens into text area
- [ ] Token parsing works (one per line)
- [ ] Invalid token handling (short tokens, malformed)
- [ ] Token count displays correctly

## Auto-Auth Testing

### 4. Account File Loading
- [ ] Create test accounts.txt with format:
  ```
  test@example.com:testpass
  eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIs...
  ```
- [ ] Click "Browse" button
- [ ] File opens successfully
- [ ] Account count displays

### 5. OAuth Authentication
- [ ] Enable "Auto-Auth from Credentials" checkbox
- [ ] Select valid accounts file
- [ ] Click "START SNIPE" (with future drop time)
- [ ] OAuth flow initiates
- [ ] Device code displays in log
- [ ] Complete auth on Microsoft website
- [ ] Token received successfully
- [ ] Token cached if "Save tokens" enabled

### 6. Mixed Format Support
- [ ] Create file with both email:pass and raw tokens
- [ ] Load file
- [ ] Email:pass triggers OAuth
- [ ] Raw tokens used directly
- [ ] Both types work together

## Multi-Name Execution Testing

### 7. Sequential Mode
- [ ] Enter 3 usernames
- [ ] Set drop time 30 seconds in future
- [ ] Start snipe
- [ ] Names processed one at a time
- [ ] Results logged per name
- [ ] Success/failure tracked

### 8. Staggered Mode
- [ ] Enter 3 usernames
- [ ] Set stagger delay (15 seconds)
- [ ] Set drop time
- [ ] Start snipe
- [ ] Verify delay between name attempts
- [ ] All names eventually processed

### 9. Token Rotation
- [ ] Load 5 tokens
- [ ] Enter 3 usernames
- [ ] Start snipe
- [ ] Verify tokens rotate between names
- [ ] Rate limits not exceeded

## Error Handling Testing

### 10. Invalid Credentials
- [ ] Use wrong email:password
- [ ] OAuth fails gracefully
- [ ] Error message displays
- [ ] System continues with other accounts

### 11. Invalid Tokens
- [ ] Use expired bearer token
- [ ] Token rejected by API
- [ ] System rotates to next token
- [ ] Error logged

### 12. Network Errors
- [ ] Disconnect network
- [ ] Start snipe
- [ ] Error handled gracefully
- [ ] Retry logic works (if implemented)

### 13. Rate Limit Handling
- [ ] Use single token for multiple rapid requests
- [ ] 429 (Too Many Requests) received
- [ ] System backs off appropriately
- [ ] Recovers after cooldown

## Performance Testing

### 14. Single Name, Many Tokens
- [ ] Enter 1 username
- [ ] Load 20 tokens
- [ ] Set immediate drop time
- [ ] Measure success rate
- [ ] Verify no crashes with high request volume

### 15. Many Names, Single Token
- [ ] Enter 10 usernames
- [ ] Load 1 token
- [ ] Set staggered mode (5s delay)
- [ ] All names processed
- [ ] Token survives rate limiting

### 16. Many Names, Many Tokens
- [ ] Enter 10 usernames
- [ ] Load 20 tokens
- [ ] Set sequential mode
- [ ] All names processed
- [ ] Token rotation works correctly
- [ ] Success rate reasonable

## Edge Cases

### 17. Empty Inputs
- [ ] No usernames entered - error handled
- [ ] No tokens loaded - error handled
- [ ] Empty accounts file - error handled

### 18. Invalid Drop Times
- [ ] Past timestamp - error handled
- [ ] Malformed timestamp - error handled
- [ ] Very far future (1 year) - works or error

### 19. Special Characters
- [ ] Username with underscores (valid) - works
- [ ] Username with numbers (valid) - works
- [ ] Username too long (>16 chars) - error
- [ ] Username too short (<3 chars) - error

### 20. GUI Interaction
- [ ] Cancel snipe mid-execution - stops cleanly
- [ ] Close window during snipe - exits gracefully
- [ ] Change settings mid-snipe - ignored or error
- [ ] Multiple rapid "START" clicks - handled

## Integration Testing

### 21. Full Workflow - Auto-Auth
```
1. Create accounts.txt with 3 email:password pairs
2. Enable auto-auth, select file
3. Enter 2 usernames
4. Set drop time 1 minute in future
5. Start snipe
6. Complete OAuth for all 3 accounts
7. Verify tokens cached
8. Verify snipe executes with fresh tokens
```
- [ ] End-to-end success

### 22. Full Workflow - Manual Tokens
```
1. Generate tokens manually (Microsoft website)
2. Paste 5 tokens into GUI
3. Enter 3 usernames
4. Set staggered mode (10s)
5. Start snipe
6. Verify all names processed
7. Check success/failure results
```
- [ ] End-to-end success

### 23. Full Workflow - Mixed
```
1. Create accounts.txt with 2 email:pass + 3 raw tokens
2. Enable auto-auth, select file
3. Enter 5 usernames
4. Set sequential mode
5. Start snipe
6. Complete OAuth for 2 accounts
7. Verify all 5 tokens used (2 fresh + 3 raw)
8. Verify all names processed
```
- [ ] End-to-end success

## Performance Metrics

### 24. Timing Tests
- [ ] OAuth flow completion time (< 60 seconds expected)
- [ ] Token refresh time (< 5 seconds)
- [ ] Single claim request time (< 1 second)
- [ ] DNS pre-resolution benefit (measure with/without)

### 25. Resource Usage
- [ ] Memory usage during snipe (< 500MB)
- [ ] CPU usage during snipe (< 50%)
- [ ] Network connections (check with `netstat`)
- [ ] File descriptors (check with `lsof`)

## Documentation Verification

### 26. Guides
- [ ] MULTI_NAME_GUIDE.md - readable and accurate
- [ ] IMPLEMENTATION_SUMMARY.md - matches code
- [ ] accounts.example.txt - correct format
- [ ] FUTURE_FEATURES.md - up to date

### 27. Code Comments
- [ ] MicrosoftAuth class - well documented
- [ ] Account helpers - clear purpose
- [ ] GUI controls - labeled appropriately
- [ ] Error messages - user-friendly

## Final Validation

### 28. Production Readiness
- [ ] All tests passed (green checkmarks above)
- [ ] No critical bugs found
- [ ] Error handling comprehensive
- [ ] Performance acceptable
- [ ] Documentation complete

### 29. Deployment
- [ ] Backup current working version
- [ ] Test on clean system (if possible)
- [ ] Verify all dependencies installed
- [ ] Create release notes

### 30. Sign-Off
- [ ] King tested and approved
- [ ] Ready for production use
- [ ] Known limitations documented
- [ ] Support plan in place

---

## Test Results (Fill In)

**Tested By:** _______________
**Date:** _______________
**Python Version:** _______________
**System:** _______________

### Summary
- Total Tests: 30
- Passed: ____
- Failed: ____
- Skipped: ____
- Issues Found: ____

### Critical Issues
1. _________________________________________
2. _________________________________________
3. _________________________________________

### Notes
________________________________________
________________________________________
________________________________________

---

**Status:** ⏳ Ready for Testing
**Next Step:** King to perform runtime testing with real Microsoft accounts
