Skip to content

Latest commit

 

History

History
186 lines (144 loc) · 4.71 KB

File metadata and controls

186 lines (144 loc) · 4.71 KB

🧪 COMPLETE ENDPOINT TESTING GUIDE

🌐 DEPLOYMENT URL

https://hospital-4c86rkq20-basantkr762s-projects.vercel.app/

📋 MANUAL TESTING CHECKLIST

1. Basic API Test 🔍

URL: Copy and paste into browser:

https://hospital-4c86rkq20-basantkr762s-projects.vercel.app/api/test

Expected: {"success": true, "message": "API is working"} Status: [ ] ✅ Working [ ] ❌ Error


2. Doctor List Endpoint 👩‍⚕️

URL: Copy and paste into browser:

https://hospital-4c86rkq20-basantkr762s-projects.vercel.app/api/doctor/list

Expected: JSON with doctors array (sample or real data) Status: [ ] ✅ Working [ ] ❌ Error


3. User Registration (GET) 📝

URL: Copy and paste into browser:

https://hospital-4c86rkq20-basantkr762s-projects.vercel.app/api/user/register

Expected: {"success": false, "message": "Missing Details"} OR method not allowed Status: [ ] ✅ Working [ ] ❌ Error


4. User Login (GET) 🔐

URL: Copy and paste into browser:

https://hospital-4c86rkq20-basantkr762s-projects.vercel.app/api/user/login

Expected: Error message or method not allowed (normal for GET request) Status: [ ] ✅ Working [ ] ❌ Error


5. Admin Login (GET) 👨‍💼

URL: Copy and paste into browser:

https://hospital-4c86rkq20-basantkr762s-projects.vercel.app/api/admin/login

Expected: Error message or method not allowed (normal for GET request) Status: [ ] ✅ Working [ ] ❌ Error


6. Doctor Login (GET) 🩺

URL: Copy and paste into browser:

https://hospital-4c86rkq20-basantkr762s-projects.vercel.app/api/doctor/login

Expected: Error message or method not allowed (normal for GET request) Status: [ ] ✅ Working [ ] ❌ Error


7. Test Doctors Endpoint 🧪

URL: Copy and paste into browser:

https://hospital-4c86rkq20-basantkr762s-projects.vercel.app/api/doctors-test

Expected: JSON with test doctors data Status: [ ] ✅ Working [ ] ❌ Error


🌐 FRONTEND TESTING

8. Homepage 🏠

URL: Copy and paste into browser:

https://hospital-4c86rkq20-basantkr762s-projects.vercel.app/

Expected: Hospital homepage loads with doctor cards Status: [ ] ✅ Working [ ] ❌ Error

9. Login Page 🔐

URL: Copy and paste into browser:

https://hospital-4c86rkq20-basantkr762s-projects.vercel.app/login

Expected: Login/Register form loads Status: [ ] ✅ Working [ ] ❌ Error

10. About Page ℹ️

URL: Copy and paste into browser:

https://hospital-4c86rkq20-basantkr762s-projects.vercel.app/about

Expected: About page loads Status: [ ] ✅ Working [ ] ❌ Error


🔄 FUNCTIONAL TESTING

11. User Registration (Actual)

  1. Go to: https://hospital-4c86rkq20-basantkr762s-projects.vercel.app/login
  2. Click "Create account"
  3. Fill in:
  4. Click "Create account"

Expected: Success message or redirect Status: [ ] ✅ Working [ ] ❌ Error

12. User Login (Actual)

  1. Go to: https://hospital-4c86rkq20-basantkr762s-projects.vercel.app/login
  2. Use credentials from registration above
  3. Click "Login"

Expected: Login success and redirect to homepage Status: [ ] ✅ Working [ ] ❌ Error


🚨 ERROR REPORTING

For any failing endpoint, note:

  1. URL that failed
  2. Error message shown
  3. Expected vs Actual result

Common Issues to Look For:

  • 500 Internal Server Error
  • Database connection failed
  • bufferCommands error
  • CORS error
  • 404 Not Found

SUCCESS CRITERIA

MINIMUM WORKING SYSTEM:

  • API test returns success
  • Doctor list returns data (sample or real)
  • Homepage loads without errors
  • Login page loads
  • Registration form submits without 500 errors

FULLY FUNCTIONAL SYSTEM:

  • All API endpoints respond
  • User registration works
  • User login works
  • Doctor cards display on homepage
  • Navigation works between pages

📝 TESTING INSTRUCTIONS

  1. Test each URL by copying and pasting into your browser
  2. Check the results against expected outcomes
  3. Mark each test as ✅ Working or ❌ Error
  4. Report any errors with specific details

Let me know the results and I'll fix any remaining issues! 🎯


🎯 PRIORITY TESTING ORDER

Test in this order:

  1. API Test (most basic)
  2. Doctor List (core functionality)
  3. Homepage (user experience)
  4. Login Page (user interaction)
  5. Registration (full functionality)

Start with #1-4 and report back the results! 🚀