Skip to content

Latest commit

 

History

History
212 lines (166 loc) · 5.2 KB

File metadata and controls

212 lines (166 loc) · 5.2 KB

Testing Guide - Smart Security Guardian

🚀 Quick Start Testing

Step 1: Load Extension in Chrome

  1. Open Chrome browser
  2. Navigate to chrome://extensions/
  3. Enable "Developer mode" (toggle in top-right corner)
  4. Click "Load unpacked"
  5. Select the smart-security-guardian folder
  6. You should see the extension installed!

Step 2: Pin the Extension

  1. Click the puzzle piece icon (🧩) in Chrome toolbar
  2. Find "Smart Website Security & Privacy Guardian"
  3. Click the pin icon to keep it visible in toolbar

Step 3: Basic Functionality Tests

Test 1: Extension Loads

  • ✅ Extension appears in Chrome toolbar
  • ✅ Green shield icon is visible
  • ✅ Click icon to open popup

Test 2: Popup UI

  • ✅ Popup opens with clean, professional design
  • ✅ Shows "Scanning..." on first load
  • ✅ Displays current site name

Test 3: Security Scanning

Visit these test sites and check the results:

HTTPS Site (Should be HIGH score 80-95):

Expected:

  • Green checkmark badge
  • Score 80-95
  • "This website appears safe" message
  • SSL Certificate: ✓ Valid

HTTP Site (Should be LOWER score):

Expected:

  • Yellow or red badge
  • Lower score (30-60)
  • Warning about not using HTTPS
  • SSL threat listed

Test 4: Badge Updates

  1. Open a secure site (https://google.com)
    • Badge should show green ✓
  2. Open an HTTP site (http://example.com)
    • Badge should change to yellow ! or red X
  3. Switch between tabs
    • Badge should update for each tab

Test 5: Statistics

  1. Visit several websites
  2. Open the popup
  3. Check "Blocked Today" counter
    • Should show trackers detected on pages

Test 6: Content Script

  1. Visit any website
  2. Open Chrome DevTools (F12)
  3. Go to Console tab
  4. Look for message: "Smart Security Guardian content script loaded on: [hostname]"
  5. Check for page analysis messages

Step 4: Advanced Testing

Test Service Worker

  1. Go to chrome://extensions/
  2. Find "Smart Website Security & Privacy Guardian"
  3. Click "service worker" link under "Inspect views"
  4. Check console for messages:
    • "Service worker loaded"
    • "Extension initialized successfully"
    • "Tab updated: [url]" when visiting sites

Test Suspicious URLs

Try these patterns (SAFE test URLs, not real threats):

IP Address URL:

http://192.168.1.1

Expected: Warning about using IP instead of domain

Long URL:

https://example.com/very/long/path/that/goes/on/and/on/and/on/and/on/and/on/and/on/and/on/and/on/and/on/and/on

Expected: Warning about unusually long URL

Test Cache System

  1. Visit https://www.google.com
  2. Note the "Last scan" time
  3. Close popup
  4. Wait 5 seconds
  5. Open popup again
    • Should show cached data (same last scan time)
    • Should load instantly

🐛 Common Issues & Solutions

Issue: Extension won't load

Solution:

  • Check that all files are in the correct locations
  • Look for errors in chrome://extensions/
  • Click "Reload" on the extension

Issue: Popup is blank

Solution:

  • Right-click popup → Inspect
  • Check console for JavaScript errors
  • Verify popup.html, popup.css, popup.js are present

Issue: Badge not updating

Solution:

  • Check service worker is running (chrome://extensions/)
  • Look for errors in service worker console
  • Reload the extension

Issue: No content script messages

Solution:

  • Refresh the webpage after loading extension
  • Check that manifest.json includes content_scripts
  • Verify content-script.js exists

✅ Feature Checklist

Phase 1 - Foundation (COMPLETED)

  • Manifest.json configured
  • Extension loads in Chrome
  • Popup UI displays correctly
  • Service worker runs
  • Tab detection works
  • Badge updates based on score
  • Content script analyzes pages
  • Statistics tracking works
  • Cache system functional

Phase 2 - Core Security (NEXT)

  • VirusTotal API integration
  • PhishTank API integration
  • Enhanced security scoring
  • Persistent cache
  • Results display improvements

📊 Expected Behavior Summary

Website Type Score Range Badge Status
HTTPS, trusted 85-100 Green ✓ Safe
HTTP, basic issues 60-84 Yellow ! Warning
Suspicious patterns 0-59 Red X Danger
Internal pages N/A None Unsupported

🔍 Debug Mode

To enable verbose logging:

  1. Open service worker console
  2. All scans are logged with full data
  3. Open popup with DevTools (right-click → Inspect)
  4. Check console for UI updates

📝 Test Report Template

TESTED ON:
- Browser: Chrome [version]
- OS: [your OS]
- Date: [date]

RESULTS:
✅ Extension loads
✅ Popup displays
✅ Scans work
✅ Badge updates
✅ Statistics track

ISSUES FOUND:
[List any issues]

NOTES:
[Any observations]

🎯 Next Testing Phase

Once Phase 2 (Core Security) is implemented, we'll test:

  • Real VirusTotal API calls
  • PhishTank database lookups
  • Enhanced scoring algorithms
  • API rate limiting
  • Error handling for API failures

Happy Testing! 🚀

Report any issues or unexpected behavior so we can fix them before moving to Phase 2.