|
Download dev/TESTING_GUIDE.md from enronarchive/mail: direct link, hf CLI and curl.
- Browser
- Download file 5.45 kB
-
https://huggingface.co/datasets/enronarchive/mail/resolve/main/dev/TESTING_GUIDE.md
- Command line
-
hf download hf://datasets/enronarchive/mail/dev/TESTING_GUIDE.md
-
curl -L -o TESTING_GUIDE.md https://huggingface.co/datasets/enronarchive/mail/resolve/main/dev/TESTING_GUIDE.md
5.45 kB
| # Testing Guide - Enron Mail Repository | |
| ## Server is Running! ✅ | |
| The Python HTTP server is now running on **http://localhost:8000** | |
| --- | |
| ## Quick Test URLs | |
| ### 1. **Test Page for Split JSON Files** | |
| **URL:** http://localhost:8000/dev/test-split-json.html | |
| This automated test page will: | |
| - Test loading non-split mailbox (south-s) | |
| - Test loading small split mailbox (farmer-d - 2 parts) | |
| - Test loading medium split mailbox (jones-t - 3 parts) | |
| - Test loading large split mailbox (kean-s - 15 parts) | |
| - Show load times and email counts | |
| - ✅ or ❌ Pass/Fail indicators | |
| ### 2. **Main Site** | |
| **URL:** http://localhost:8000/index.html | |
| Test the actual mailbox viewer: | |
| - Login with any username (e.g., "kean-s") | |
| - Any password works | |
| - Browse folders and emails | |
| - Test attachments | |
| ### 3. **Specific Mailbox Tests** | |
| **Non-Split User (Original Structure):** | |
| - http://localhost:8000/mail/mailbox-viewer.html?mailbox=south-s | |
| - Should load normally, 250 emails | |
| **Split Users (New Structure):** | |
| - http://localhost:8000/mail/mailbox-viewer.html?mailbox=kean-s (15 parts, 225,633 emails) | |
| - http://localhost:8000/mail/mailbox-viewer.html?mailbox=dasovich-j (10 parts, 75,382 emails) | |
| - http://localhost:8000/mail/mailbox-viewer.html?mailbox=kaminski-v (4 parts, 55,277 emails) | |
| **Users with Reorganized Attachments:** | |
| - http://localhost:8000/mail/mailbox-viewer.html?mailbox=kean-s | |
| - Open any email with attachments | |
| - Click attachment links to verify they download | |
| --- | |
| ## What to Test | |
| ### ✅ Basic Functionality | |
| 1. **Login**: Enter any username from the list | |
| 2. **Mailbox loads**: All folders appear in sidebar | |
| 3. **Email list loads**: Emails display in the main view | |
| 4. **Email opens**: Click an email to view full content | |
| 5. **Search works**: Use search box to filter emails | |
| 6. **Attachments work**: Click attachment links to download files | |
| ### ✅ Split JSON Files (Technical) | |
| 1. **Open browser DevTools** (F12) | |
| 2. **Go to Console tab** | |
| 3. **Load a split mailbox** (e.g., kean-s) | |
| 4. **Look for messages**: | |
| - "Loading 15 index file parts..." | |
| - "Loaded part 2: 15000 emails" | |
| - "Total emails loaded: 225633" | |
| ### ✅ Performance | |
| - **Small mailbox** (south-s): Should load instantly | |
| - **Medium mailbox** (jones-t, 3 parts): ~1-2 seconds | |
| - **Large mailbox** (kean-s, 15 parts): ~2-4 seconds | |
| ### ✅ Attachments in Batch Folders | |
| 1. Navigate to kean-s mailbox | |
| 2. Find an email with attachments (look for @ icon) | |
| 3. Open the email | |
| 4. Click an attachment link | |
| 5. File should download correctly | |
| --- | |
| ## Known Test Scenarios | |
| ### Users to Test (All 14 Split Users) | |
| | Username | Parts | Emails | Attachments Batches | | |
| |----------|-------|--------|---------------------| | |
| | kean-s | 15 | 225,633 | 9 batches | | |
| | dasovich-j | 10 | 75,382 | 4 batches | | |
| | kaminski-v | 4 | 55,277 | 3 batches | | |
| | shackleton-s | 3 | 33,266 | 2 batches | | |
| | jones-t | 3 | 33,720 | 2 batches | | |
| | taylor-m | 3 | 33,116 | 2 batches | | |
| | skilling-j | 3 | 31,819 | - | | |
| | whalley-g | 4 | 31,342 | - | | |
| | mann-k | 2 | 28,312 | 3 batches | | |
| | haedicke-m | 2 | 35,882 | - | | |
| | farmer-d | 2 | 21,900 | - | | |
| | nemec-g | 2 | 19,346 | 2 batches | | |
| | scott-s | 2 | 15,200 | - | | |
| | shapiro-r | 2 | 11,071 | - | | |
| --- | |
| ## Expected Results | |
| ### ✅ All Should Work: | |
| - All mailboxes load without errors | |
| - Email counts match the table above | |
| - Folders display correctly | |
| - Emails open and display content | |
| - Attachments download successfully | |
| - Search/filter functions work | |
| - No console errors in DevTools | |
| ### ⚠️ Acceptable Issues: | |
| - First load of large mailbox (kean-s) may take 2-4 seconds | |
| - Very large mailboxes may show brief "Loading..." message | |
| ### ❌ Red Flags (Report These): | |
| - Console errors about failed to load index-part-N.json | |
| - Email count doesn't match expected (within reason) | |
| - Attachments fail to download (404 errors) | |
| - Mailbox doesn't load at all | |
| - JavaScript errors in console | |
| --- | |
| ## Debugging Tips | |
| If something doesn't work: | |
| 1. **Check Console (F12)** | |
| - Look for red error messages | |
| - Note which file failed to load | |
| 2. **Check Network Tab (F12)** | |
| - See all files being requested | |
| - Check for 404 (Not Found) errors | |
| - Verify index-part-N.json files load | |
| 3. **Verify File Exists** | |
| - If index-part-3.json fails, check: | |
| - `mail/USERNAME/index-part-3.json` exists | |
| 4. **Common Issues** | |
| - **CORS errors**: Make sure using http://localhost:8000, not file:// | |
| - **Port in use**: If 8000 is busy, restart server on different port | |
| - **Cache**: Hard refresh with Ctrl+F5 | |
| --- | |
| ## Stop the Server | |
| When done testing: | |
| 1. Go back to the terminal/console | |
| 2. Press **Ctrl+C** | |
| 3. Server will stop | |
| --- | |
| ## Re-Run Verification | |
| If you want to re-run the comprehensive tests: | |
| ```powershell | |
| python dev\tools\final_verification.py | |
| ``` | |
| This will check: | |
| - ✅ All JSON files valid and under 50MB | |
| - ✅ No folders over 9000 files | |
| - ✅ All backups in dev/backup/ | |
| - ✅ .gitignore configured | |
| --- | |
| ## Summary | |
| Everything has been: | |
| - ✅ Split and reorganized for Git compatibility | |
| - ✅ Verified for data integrity (zero data loss) | |
| - ✅ Updated with working application code | |
| - ✅ Tested with automated scripts | |
| - ✅ Ready for manual verification | |
| **Server Running:** http://localhost:8000 | |
| **Test Page:** http://localhost:8000/dev/test-split-json.html | |
| Happy testing! 🎉 | |