| # π§ͺ Complete Testing Guide - Step by Step | |
| ## Overview | |
| Your system has two parts: | |
| 1. **Python Backend** (FastAPI) - Analyzes PowerPoints and generates alt text | |
| 2. **Angular Frontend** (Web UI) - Upload interface for users | |
| ## β Prerequisites Check | |
| Before starting, verify everything is installed: | |
| ```bash | |
| # Backend packages installed? | |
| cd "Cycle 2 Testing/Accessibility-Checker-BE/python-server" | |
| python -c "import fastapi; import transformers; print('β Backend ready')" | |
| # Frontend dependencies installed? | |
| cd "Cycle 2 Testing/Accessibility-Checker" | |
| npm list angular 2>/dev/null | head -3 | |
| ``` | |
| --- | |
| ## π Step 1: Start the Python Backend | |
| ### Open Terminal 1 (Backend) | |
| ```bash | |
| cd "e:\Local Senior Project\Cycle 2 Testing\Accessibility-Checker-BE\python-server" | |
| python server2.py | |
| ``` | |
| ### Expected Output | |
| ``` | |
| β Local AI vision model loaded (BLIP - 100% FREE, No Costs) | |
| π Loading ISO schema validation... | |
| π Uvicorn running on http://127.0.0.1:5000 | |
| ``` | |
| **First run will download BLIP model (~1-2GB, takes 5-15 minutes)** | |
| **Wait for this line before proceeding:** | |
| ``` | |
| Application startup complete | |
| ``` | |
| --- | |
| ## π Step 2: Start the Angular Frontend | |
| ### Open Terminal 2 (Frontend) | |
| ```bash | |
| cd "e:\Local Senior Project\Cycle 2 Testing\Accessibility-Checker" | |
| npm start | |
| ``` | |
| ### Expected Output | |
| ``` | |
| β Compiled successfully | |
| βΉ Application bundle generation complete | |
| Initial Chunk Files | Names | Raw Size | |
| vendor.js | | 2.5 MB | | |
| main.js | | 250 KB | | |
| ... | |
| β Build at: YYYY-MM-DD HH:MM:SS | |
| β Serving from: .\ | |
| Application bundle generation complete | |
| ``` | |
| ### Open in Browser | |
| Once you see "Compiled successfully", open: | |
| ``` | |
| http://localhost:4200 | |
| ``` | |
| You should see the **Accessibility Checker** web interface. | |
| --- | |
| ## π Step 3: Create or Get a Test PowerPoint | |
| ### Option A: Use Existing PowerPoint | |
| - Look in: `Cycle 2 Testing\Accessibility-Checker-BE\test-docs\` | |
| - Should contain sample PowerPoint files | |
| ### Option B: Create Simple Test PowerPoint | |
| **For Windows (using PowerPoint):** | |
| 1. Open PowerPoint | |
| 2. Create a new presentation | |
| 3. Add a slide with: | |
| - A title (e.g., "Test Slide") | |
| - An image (any image) | |
| - Leave the image WITHOUT alt text (that's what we're testing) | |
| 4. Save as: `test-presentation.pptx` | |
| 5. Save to a convenient location (e.g., Desktop) | |
| **For Windows (using LibreOffice):** | |
| ```bash | |
| # Install LibreOffice if needed | |
| # Create presentation with libreoffice | |
| ``` | |
| **No PowerPoint installed?** Download a sample file from Microsoft Office templates or use the test files that might already exist. | |
| --- | |
| ## π€ Step 4: Upload PowerPoint to System | |
| ### In the Web Browser (localhost:4200) | |
| 1. **Look for "Upload" button** | |
| - Should be prominent on the page | |
| - Usually labeled: "Upload PowerPoint" or "Choose File" | |
| 2. **Click and select your PowerPoint file** | |
| - Navigate to your `test-presentation.pptx` | |
| - Select it and upload | |
| 3. **Watch the Backend Console** | |
| - You should see activity: | |
| ``` | |
| π§ Starting alt text remediation for: test-presentation.pptx | |
| AI Mode: LOCAL (100% FREE - No Costs) | |
| π€ Using FREE local AI (BLIP) for slide 1 | |
| β AI generated alt text for Picture 1: 'A colorful chart showing...' | |
| β Remediation complete: 1 images processed | |
| π€ 1 alt texts generated by FREE local AI (no cost) | |
| ``` | |
| --- | |
| ## π Step 5: View Results | |
| ### In Web Browser | |
| After upload completes, you should see: | |
| 1. **Accessibility Report** | |
| - Summary of issues found | |
| - Number of images without alt text | |
| - List of missing/bad alt text descriptions | |
| 2. **Sample Report Output** | |
| ``` | |
| FILE ANALYSIS RESULTS | |
| βββββββββββββββββββββββββ | |
| β Issues Fixed: 1 | |
| β οΈ Issues Flagged: 0 | |
| Image Alt Text Status: | |
| β’ Slide 1 - Picture 1: "Bar chart with increasing values" | |
| ``` | |
| 3. **Response JSON** (in browser console) | |
| ```json | |
| { | |
| "fileName": "test-presentation.pptx", | |
| "suggestedFileName": "remediated-test-presentation.pptx", | |
| "report": { | |
| "summary": { "fixed": 1, "flagged": 0 }, | |
| "details": { | |
| "imagesMissingOrBadAlt": [] | |
| } | |
| } | |
| } | |
| ``` | |
| --- | |
| ## πΎ Step 6: Download Remediated File | |
| ### In Web Browser | |
| 1. **Look for "Download" button** | |
| - Usually appears after upload | |
| - Text might be: "Download Remediated PowerPoint" or "Download Fixed File" | |
| 2. **Click to download** | |
| - File will save locally as: `remediated-test-presentation.pptx` | |
| 3. **Open downloaded file in PowerPoint** | |
| ``` | |
| Right-click image β Properties β Alt Text | |
| ``` | |
| 4. **Verify alt text was added** | |
| - Should see the AI-generated description | |
| - Example: "Bar chart with increasing values" | |
| --- | |
| ## β Verification Checklist | |
| After completing all steps, check: | |
| ### Backend Console Should Show | |
| - β `β Local AI vision model loaded` | |
| - β `π€ Using FREE local AI (BLIP) for slide X` | |
| - β `β AI generated alt text for Picture X` | |
| - β `β Remediation complete: X images processed` | |
| - β `π€ X alt texts generated by FREE local AI` | |
| ### Downloaded File Should Have | |
| - β Original PowerPoint content preserved | |
| - β New alt text on all previously missing images | |
| - β Alt text is descriptive (not just "image" or "picture") | |
| - β File can be opened normally in PowerPoint | |
| ### Cost Should Be | |
| - β **$0.00** - No API charges | |
| - β No internet calls after first model download | |
| - β Everything local and private | |
| --- | |
| ## π Troubleshooting | |
| ### "Server not responding" / "Cannot connect to localhost:5000" | |
| **Solution:** | |
| 1. Check Terminal 1 - is backend still running? | |
| 2. Look for errors in backend output | |
| 3. Restart backend: `Ctrl+C` then `python server2.py` | |
| 4. Wait for "Application startup complete" | |
| ### "Frontend not loading" / "Cannot access localhost:4200" | |
| **Solution:** | |
| 1. Check Terminal 2 - is frontend still running? | |
| 2. Open http://localhost:4200 in browser | |
| 3. Check browser console for errors (F12) | |
| 4. Restart frontend: `Ctrl+C` then `npm start` | |
| ### "Model downloading..." for more than 20 minutes | |
| **This is normal for first run!** Downloading 1-2GB takes time. | |
| ``` | |
| β First run: 5-15 minutes (downloading BLIP model) | |
| β Subsequent runs: Instant (model cached) | |
| ``` | |
| ### "AI not generating alt text" / Empty descriptions | |
| **Check:** | |
| 1. Are images in PowerPoint actually visible? | |
| 2. Are images in supported formats (PNG, JPG)? | |
| 3. Try `python test_ai_setup.py` to verify AI works | |
| 4. Check backend console for error messages | |
| ### "Upload button doesn't appear" | |
| **Solution:** | |
| 1. Check if frontend has compiled (look for "Compiled successfully") | |
| 2. Hard refresh browser: `Ctrl+Shift+R` | |
| 3. Open browser DevTools: `F12` β Console | |
| 4. Look for JavaScript errors | |
| ### "Downloaded file won't open" | |
| **Solution:** | |
| 1. Check file size - should be similar to original | |
| 2. Try opening with different PowerPoint version | |
| 3. Check if file is corrupted - reupload | |
| 4. Look at backend logs for errors | |
| --- | |
| ## π What to Expect: Real Example | |
| ### Input PowerPoint | |
| - 3 slides | |
| - 5 images total | |
| - 0 images have alt text | |
| ### System Processing | |
| ``` | |
| π§ Starting alt text remediation for: sample.pptx | |
| AI Mode: LOCAL (100% FREE - No Costs) | |
| π€ Using FREE local AI (BLIP) for slide 1 | |
| β AI generated alt text for Picture 1: 'Professional man in business suit' | |
| β AI generated alt text for Picture 2: 'Bar graph with red and blue columns' | |
| π€ Using FREE local AI (BLIP) for slide 2 | |
| β AI generated alt text for Picture 3: 'Team meeting in conference room' | |
| β AI generated alt text for Picture 4: 'Laptop displaying code editor' | |
| π€ Using FREE local AI (BLIP) for slide 3 | |
| β AI generated alt text for Picture 5: 'Company logo on blue background' | |
| β Remediation complete: 5 images processed | |
| π€ 5 alt texts generated by FREE local AI (no cost) | |
| ``` | |
| ### Output PowerPoint | |
| - Same 3 slides, all images | |
| - All 5 images now have descriptive alt text | |
| - File works exactly like original | |
| - **Cost: $0.00** π | |
| --- | |
| ## π― Testing Scenarios | |
| ### Test 1: Basic Image (Easy) | |
| 1. PowerPoint with 1 simple image | |
| 2. Expected: Describe what's in image | |
| 3. Example: "Logo design with blue colors" | |
| ### Test 2: Multiple Images (Medium) | |
| 1. PowerPoint with 3-5 images on different slides | |
| 2. Expected: Each gets unique description | |
| 3. Verify: All descriptions are different | |
| ### Test 3: Complex Presentation (Advanced) | |
| 1. Real presentation with charts, photos, logos | |
| 2. Expected: All get meaningful descriptions | |
| 3. Verify: Chart descriptions mention data/trends | |
| --- | |
| ## π± What The System Actually Does | |
| ### Internally | |
| 1. **Receives PowerPoint** β Unzips to XML | |
| 2. **Finds images** β Extracts from ZIP | |
| 3. **Analyzes images** β Uses local BLIP AI model | |
| 4. **Generates descriptions** β Creates alt text | |
| 5. **Updates XML** β Adds alt text to image properties | |
| 6. **Repackages** β Zips back into PowerPoint | |
| 7. **Delivers file** β User downloads fixed PowerPoint | |
| ### Data Flow | |
| ``` | |
| User PowerPoint | |
| β | |
| Backend receives file | |
| β | |
| Extract images from PowerPoint ZIP | |
| β | |
| Send to LOCAL BLIP AI (runs on your computer) | |
| β | |
| AI analyzes images | |
| β | |
| AI generates descriptions | |
| β | |
| Insert descriptions into PowerPoint XML | |
| β | |
| Package back into PowerPoint file | |
| β | |
| User downloads remediated file | |
| ``` | |
| **Key Point**: Everything runs locally - images never sent to internet! | |
| --- | |
| ## π‘ Tips for Best Results | |
| 1. **Use clear, simple images** - More likely to get good descriptions | |
| 2. **Include variety** - Test with photos, charts, logos | |
| 3. **Check backend console** - Understand what AI is doing | |
| 4. **Read descriptions carefully** - Verify they're accurate | |
| 5. **Edit if needed** - AI descriptions are starting point, not final | |
| --- | |
| ## π Next Steps After Testing | |
| Once you verify everything works: | |
| 1. **Test with real presentations** from your team | |
| 2. **Collect feedback** - Is AI quality good enough? | |
| 3. **Adjust if needed** - Can tweak model in `.env` | |
| 4. **Deploy** - Set up on server for team to use | |
| 5. **Monitor costs** - Should always be $0 (local AI) | |
| --- | |
| ## π Still Having Issues? | |
| Check these in order: | |
| 1. **Backend running?** Terminal 1 shows "Application startup complete" | |
| 2. **Frontend running?** Terminal 2 shows "Compiled successfully" | |
| 3. **Both on correct ports?** Backend: 5000, Frontend: 4200 | |
| 4. **Firewall blocking?** Windows Firewall might block local connections | |
| 5. **AI downloaded?** First run takes 5-15 min for BLIP model | |
| If still stuck, check the **console output** - that's where errors appear! | |
| --- | |
| ## π Success Criteria | |
| β Backend starts without errors | |
| β Frontend loads in browser | |
| β Can upload PowerPoint file | |
| β System processes file (backend shows activity) | |
| β Can download remediated file | |
| β Downloaded file has alt text | |
| β Alt text is descriptive (not generic) | |
| β Cost is $0.00 (local AI only) | |
| If all boxes checked β **Your system works!** π | |