This guide will help you test all features of the Cafe Management System.
- Python 3.8+ installed
- All dependencies installed (
pip install -r requirements.txt) - Application runs without errors
- Database initialized successfully
- Default admin user created
Steps:
- Run
python main.py - Check console output for initialization messages
- Verify default admin credentials displayed
Expected Results:
- ✅ Database tables created
- ✅ Default admin user created (admin/admin123)
- ✅ Sample products created
- ✅ Login dialog appears
Test Cases:
- Valid credentials (admin/admin123)
- Invalid credentials
- Empty fields
Expected Results:
- ✅ Successful login with valid credentials
- ✅ Error message for invalid credentials
- ✅ Main window opens after successful login
Features to Test:
- Product categories display correctly
- Products display with name, price, category
- Click on product adds to cart
- Quantity controls (+/-) work
- Remove item from cart works
- Table selection works
- Discount field accepts numbers
- Total calculations are correct
- Submit order creates order successfully
Steps:
- Select each theme from dropdown:
- Blue Modern
- Dark
- Orange
- Coffee
Expected Results:
- ✅ UI colors change immediately
- ✅ All elements remain readable
- ✅ No visual glitches
Steps:
- Click 🌐 button in header
- Server Settings dialog opens
- Verify current status displayed
- Click "Start Server"
- Wait for confirmation
- Check URLs displayed
Expected Results:
- ✅ Dialog opens without errors
- ✅ Server starts successfully
- ✅ Local URL displayed (http://127.0.0.1:8080)
- ✅ Network URL displayed (http://[IP]:8080)
- ✅ Status changes to "Running"
Local Access Test:
- Start web server from desktop app
- Open browser
- Navigate to
http://localhost:8080
Expected Results:
- ✅ Home page loads
- ✅ Styles applied correctly
- ✅ No console errors
Required:
- Two devices on same network (e.g., computer + phone)
- Server running with host
0.0.0.0
Steps:
- On main computer:
- Start server
- Note the network URL
- On second device (phone/tablet):
- Connect to same Wi-Fi
- Open browser
- Navigate to network URL
- Attempt to access the site
Expected Results:
- ✅ Page loads on second device
- ✅ Styles render correctly
- ✅ Can login
- ✅ Can create orders
Troubleshooting if fails:
- Check firewall settings
- Verify both devices on same network
- Try pinging server IP from client device
- Check server is using 0.0.0.0 not 127.0.0.1
Test Cases:
Valid: admin / admin123
Invalid: admin / wrongpass
Empty: (blank fields)
Expected Results:
- ✅ Successful login redirects to dashboard
- ✅ Token stored in localStorage
- ✅ User info displayed in navbar
- ✅ Error message for invalid credentials
Features:
- Statistics cards display correctly
- Recent orders table shows data
- Quick action buttons work
- Auto-refresh every 30 seconds
Expected Results:
- ✅ All stats show correct numbers
- ✅ Charts/data load
- ✅ Navigation links work
- ✅ Admin menu visible for admin users only
Steps:
- Navigate to "New Order"
- Select category filter
- Click on products
- Adjust quantities
- Set table number (optional)
- Add discount (optional)
- Submit order
Expected Results:
- ✅ Products display in grid
- ✅ Category filter works
- ✅ Cart updates when products added
- ✅ Quantity controls work
- ✅ Totals calculate correctly
- ✅ Order submitted successfully
- ✅ Success message shown
- ✅ Cart clears after submission
Features:
- View all orders
- Filter by status
- View order details
- Update order status
- Real-time updates
Expected Results:
- ✅ Orders list displays correctly
- ✅ Status filters work
- ✅ Order details modal opens
- ✅ Can change order status
- ✅ Status badges show correct colors
- ✅ List refreshes automatically
Prerequisites: Logged in as admin
Features:
- View users list
- Create new user
- Toggle user active/inactive
- Delete user
Test Cases:
Create User:
Username: testuser
Password: test123
Full Name: Test User
Role: cashier
Expected Results:
- ✅ User list displays
- ✅ New user form validates input
- ✅ User created successfully
- ✅ New user appears in list
- ✅ Can toggle user status
- ✅ Cannot delete/deactivate self
Devices to Test:
- Desktop (1920x1080)
- Laptop (1366x768)
- Tablet (768x1024)
- Mobile (375x667)
Features:
- Navigation menu responsive
- Forms usable on small screens
- Tables scroll horizontally if needed
- Buttons appropriately sized for touch
- Text readable without zooming
Expected Results:
- ✅ Layout adapts to screen size
- ✅ All features accessible
- ✅ No horizontal scrolling (except tables)
- ✅ Touch targets large enough
Test Cases:
- Access protected pages without login
- Use invalid/expired token
- Logout functionality
Expected Results:
- ✅ Redirects to login if not authenticated
- ✅ Token validation works
- ✅ Logout clears session
- ✅ Cannot access after logout
Test Cases:
- Non-admin tries to access admin panel
- Cashier tries to create users
- Inactive user tries to login
Expected Results:
- ✅ 403 Forbidden for unauthorized access
- ✅ Admin features hidden for non-admins
- ✅ Inactive users cannot login
Test Cases:
- SQL injection attempts
- XSS attempts
- Invalid data types
- Empty required fields
Expected Results:
- ✅ Input sanitized
- ✅ Validation errors shown
- ✅ No crashes or errors
- ✅ Database integrity maintained
Scenario: Create order on web, view on desktop
Steps:
- Start web server
- Login on web interface
- Create an order
- Check desktop app order list
- Update status from desktop
- Refresh web interface
Expected Results:
- ✅ Order appears on both interfaces
- ✅ Changes sync across interfaces
- ✅ Data consistency maintained
Scenario: Multiple users on different devices
Requirements:
- 2+ devices
- 2+ user accounts
Steps:
- Login as different users on different devices
- Create orders simultaneously
- View orders from different accounts
Expected Results:
- ✅ Each user sees appropriate orders
- ✅ Admin sees all orders
- ✅ Non-admins see today's orders only
- ✅ No data conflicts
Test Data:
- 100+ products
- 50+ orders
- 10+ users
Expected Results:
- ✅ Interface remains responsive
- ✅ Queries execute quickly (< 1s)
- ✅ No memory leaks
- ✅ Smooth scrolling
Scenario: 5+ users using system simultaneously
Expected Results:
- ✅ Server handles multiple requests
- ✅ No conflicts or data corruption
- ✅ Reasonable response times
- Empty database - First run
- Large orders - 20+ items
- Maximum discount - Discount > subtotal
- Network interruption - Disconnect during operation
- Invalid port - Port already in use
- Database corruption - Invalid data
Expected Results:
- ✅ Graceful error handling
- ✅ Informative error messages
- ✅ System recovers or fails safely
- ✅ No data loss
- Launches successfully
- Login works
- POS interface functional
- Order creation works
- Themes change correctly
- Server settings accessible
- Backup/restore works
- Accessible locally
- Accessible from network
- Login/authentication works
- Dashboard displays correctly
- Can create orders
- Can view orders
- Admin panel functional (for admins)
- Responsive on mobile
- Authentication enforced
- Authorization working
- Passwords encrypted
- Tokens validated
- Input sanitized
- Data syncs between interfaces
- Multiple users work simultaneously
- No data conflicts
-
Find your IP:
# Windows ipconfig # Linux/Mac ifconfig
-
Start server with 0.0.0.0:
- Open Server Settings in desktop app
- Set host to
0.0.0.0 - Start server
-
Test from another device:
- Connect device to same Wi-Fi
- Open browser
- Go to
http://[YOUR-IP]:8080 - Try to login and use features
-
If it doesn't work:
- Check firewall (Windows Defender, etc.)
- Verify same network
- Try pinging the server IP
- Check server logs for errors
Date: _______________
Tester: _______________
Version: 2.0.0
Desktop Tests: [ ] Pass [ ] Fail
Web Tests: [ ] Pass [ ] Fail
Network Tests: [ ] Pass [ ] Fail
Mobile Tests: [ ] Pass [ ] Fail
Security Tests: [ ] Pass [ ] Fail
Issues Found:
1. _____________________
2. _____________________
3. _____________________
Notes:
_________________________
_________________________
These tests MUST pass before considering the system production-ready:
- ✅ Admin user creation on first run
- ✅ Login with correct credentials
- ✅ Create and submit order
- ✅ View orders
- ✅ Web server starts successfully
- ✅ Network accessibility (same network)
- ✅ JWT authentication works
- ✅ Password encryption
- ✅ Admin panel restricted to admins
- ✅ Backup and restore works
Happy Testing! 🎉
If you find any issues, document them with:
- Steps to reproduce
- Expected behavior
- Actual behavior
- Screenshots (if applicable)
- System information