π§ͺ Auto-Download System Testing Guide¶
Version: 1.0 Date: September 2024
Overview¶
This guide provides comprehensive testing procedures for the Printernizer Auto-Download System. Follow these steps to verify that all components are working correctly.
π§ Pre-Testing Setup¶
1. System Requirements¶
- β Frontend: All new JavaScript files loaded in index.html
- β Backend: API endpoints implemented (download and thumbnail processing)
- β Printers: At least one Bambu Lab A1 or Prusa Core One configured
- β Network: Stable connection to printers
2. Verification Checklist¶
Before testing, verify these files are present:
frontend/js/
βββ auto-download-manager.js
βββ download-queue.js
βββ thumbnail-queue.js
βββ download-logger.js
βββ auto-download-ui.js
βββ auto-download-init.js
frontend/assets/
βββ placeholder-thumbnail.svg
3. Browser Console Setup¶
Open browser DevTools and enable all console levels (Debug, Info, Warn, Error).
π Testing Procedures¶
Phase 1: System Initialization Testing¶
Test 1.1: Basic System Startup¶
- Open Printernizer dashboard in browser
- Check console for initialization messages:
- Expected Result: Green success toast "Auto-Download System is now active"
Test 1.2: Component Availability¶
Run in browser console:
// Check global objects exist
console.log('AutoDownloadManager:', !!window.autoDownloadManager);
console.log('DownloadQueue:', !!window.downloadQueue);
console.log('ThumbnailQueue:', !!window.thumbnailQueue);
console.log('DownloadLogger:', !!window.downloadLogger);
true
Test 1.3: System Status Verification¶
Expected Result: Object withstatus: 'active' and component details
Phase 2: Dashboard Integration Testing¶
Test 2.1: Status Card Display¶
- Navigate to Dashboard
- Look for Auto-Download Status Card (blue gradient)
- Verify status indicator shows green (online) or red (offline)
- Check status text shows queue information
Test 2.2: Management Panel Access¶
- Click "βοΈ Verwalten" button on status card
- Verify management modal opens
- Check tabs: Downloads, Thumbnails, History
- Verify system overview shows correct statistics
Test 2.3: Placeholder Images¶
- Navigate through dashboard
- Check all missing thumbnails show placeholder image
- Verify placeholder shows "Keine Vorschau verfΓΌgbar"
- Test placeholder hover effects work
Phase 3: Download Queue Testing¶
Test 3.1: Manual Download Trigger¶
- Go to Dashboard with active printers
- Click πΌοΈ button on any printer card
- Check console for download task messages:
- Verify toast notification appears
Test 3.2: Queue Management Interface¶
- Open management panel β Downloads tab
- Trigger a download (repeat Test 3.1)
- Watch task move from "Queued" β "Processing" β "Completed"
- Verify task shows printer name, priority, timing info
Test 3.3: Error Handling¶
- Disconnect printer or network
- Trigger download
- Verify task shows in "Failed" section
- Check error message displays correctly
Phase 4: Auto-Detection Testing¶
Test 4.1: Job Start Detection (Bambu Lab)¶
- Start a print job on Bambu Lab A1
- Watch console for auto-detection:
- Verify toast: "Auto-Download: Downloading current job file from..."
- Check management panel shows high-priority task
Test 4.2: Job Start Detection (Prusa)¶
- Start a print job on Prusa Core One
- Watch console for auto-detection:
- Verify auto-download triggers correctly
- Check same behavior as Bambu Lab
Test 4.3: Auto-Detection Toggle¶
- Open management panel
- Click "βΈοΈ Disable Auto-Detection"
- Start a print job
- Verify no auto-download triggers
- Re-enable and test auto-download works again
Phase 5: Thumbnail Processing Testing¶
Test 5.1: 3MF File Processing¶
- Download a 3MF file with embedded thumbnail
- Watch console for thumbnail processing:
- Verify toast: "Thumbnail Ready: Thumbnail processed for..."
Test 5.2: STL File Processing¶
- Download an STL file
- Verify thumbnail generation attempt:
- Check fallback to placeholder if generation fails
Test 5.3: Thumbnail Queue Management¶
- Open management panel β Thumbnails tab
- Download multiple files with different formats
- Watch processing order (3MF first, then STL, then G-code)
- Verify queue statistics update correctly
Phase 6: Printer Integration Testing¶
Test 6.1: Printer Card Thumbnails¶
- Start a print job with a file containing thumbnail
- Wait for auto-download and processing
- Check printer card shows thumbnail instead of placeholder
- Verify thumbnail is clickable and opens modal
Test 6.2: Drucker-Dateien Integration¶
- Open printer β π Drucker-Dateien
- Try downloading files from the interface
- Verify downloads go through queue system
- Check progress shown in management panel
Test 6.3: File Preview Integration¶
- Open Files page
- Click on a file to preview
- Verify thumbnail loads or shows placeholder
- Check thumbnail processing triggers if needed
Phase 7: Error Recovery Testing¶
Test 7.1: Network Interruption¶
- Start download while connected
- Disconnect network during download
- Reconnect network
- Verify download retries automatically with exponential backoff
Test 7.2: API Endpoint Failure¶
- Mock API endpoint failure (browser DevTools β Network β Block requests)
- Trigger download
- Verify retry attempts with increasing delays
- Check eventual failure marked correctly
Test 7.3: System Recovery¶
- Refresh page during active downloads
- Verify system reinitializes correctly
- Check no duplicate downloads occur
- Confirm logging continues properly
Phase 8: Performance Testing¶
Test 8.1: Concurrent Downloads¶
- Configure multiple printers
- Start jobs on all printers simultaneously
- Verify downloads process concurrently (max 2 by default)
- Check no system overload or freezing
Test 8.2: Large File Handling¶
- Download large files (>50MB if available)
- Monitor system performance
- Verify UI remains responsive
- Check memory usage doesn't spike
Test 8.3: Queue Stress Test¶
- Add many downloads quickly (>10)
- Verify queue prioritization works correctly
- Check system handles backlog gracefully
- Monitor for memory leaks or performance degradation
Phase 9: Logging and Analytics Testing¶
Test 9.1: Log Generation¶
- Perform various operations (downloads, thumbnails, errors)
- Check console for detailed logging:
- Verify all activities are logged with timestamps
Test 9.2: Log Export¶
- Open management panel
- Click "πΎ Export Logs"
- Verify JSON file downloads
- Check file contains structured log data
Test 9.3: Statistics Tracking¶
Verify returns download/thumbnail success/failure countsPhase 10: Long-term Stability Testing¶
Test 10.1: Extended Operation¶
- Leave system running for several hours
- Perform periodic operations
- Monitor for memory leaks or performance degradation
- Check log cleanup occurs as expected
Test 10.2: Browser Refresh Stability¶
- Start downloads
- Refresh page multiple times
- Verify no duplicate processing
- Check system state consistency
π Troubleshooting Common Issues¶
Issue: System Not Initializing¶
Symptoms: No console messages, status card missing Check:
// Verify script loading
console.log('Scripts loaded:', {
logger: !!window.DownloadLogger,
queue: !!window.DownloadQueue,
thumbnail: !!window.ThumbnailQueue,
manager: !!window.AutoDownloadManager
});
Issue: Downloads Not Processing¶
Symptoms: Downloads stuck in queue Check:
Solutions: - Verify backend endpoints are available - Check network connectivity to printers - Review error messages in management panelIssue: Auto-Detection Not Working¶
Symptoms: Manual downloads work, auto-detection doesn't Check:
// Check WebSocket status
console.log('WebSocket:', window.websocketManager?.isConnected);
// Check auto-detection status
console.log('Auto-detection:', window.autoDownloadManager?.config.autoDetectionEnabled);
Issue: Thumbnails Not Processing¶
Symptoms: Downloads work, thumbnails show placeholder Check:
Solutions: - Verify thumbnail processing endpoints - Check file format support - Review thumbnail queue error logsπ Test Results Template¶
Use this template to document your testing results:
# Auto-Download System Test Results
**Date**: ___________
**Tester**: ___________
**Environment**: ___________
## Phase 1: System Initialization
- [ ] Test 1.1: Basic System Startup - β
/β
- [ ] Test 1.2: Component Availability - β
/β
- [ ] Test 1.3: System Status Verification - β
/β
## Phase 2: Dashboard Integration
- [ ] Test 2.1: Status Card Display - β
/β
- [ ] Test 2.2: Management Panel Access - β
/β
- [ ] Test 2.3: Placeholder Images - β
/β
[Continue for all phases...]
## Issues Found
1. ___________
2. ___________
## Performance Notes
- Download speed: ___________
- Thumbnail processing time: ___________
- System responsiveness: ___________
## Recommendations
1. ___________
2. ___________
π Continuous Testing¶
Daily Checks¶
- System startup and initialization
- Auto-detection functionality
- Queue processing status
Weekly Checks¶
- Error log review
- Performance metrics analysis
- Log cleanup verification
Monthly Checks¶
- Full system stress testing
- Long-term stability verification
- Update testing procedures as needed
This comprehensive testing guide ensures the Auto-Download System operates reliably in all scenarios. Follow these procedures after any system updates or changes to maintain quality and reliability.