Testing Guide
This guide explains how to test the D'n'A Cruises system.
Testing Strategy
The system uses a combination of:
- Manual Testing - Primary method for MVP
- API Testing - Using curl, Postman, or similar
- Frontend Testing - Browser-based testing
- Integration Testing - End-to-end workflows
API Testing
Using curl
# GET request
curl -X GET "http://localhost:8787/items?page=1&pageSize=10" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
# POST request
curl -X POST "http://localhost:8787/items" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Test Item", "category_id": 1}'
# PUT request
curl -X PUT "http://localhost:8787/items/1" \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "Updated Item"}'
# DELETE request
curl -X DELETE "http://localhost:8787/items/1" \
-H "Authorization: Bearer YOUR_JWT_TOKEN"
Using Postman
- Create a collection for D'n'A Cruises API
- Set up environment variables:
base_url:http://localhost:8787(local) or production URLjwt_token: Your JWT token
- Add Authorization header:
Bearer {{jwt_token}} - Create requests for each endpoint
Frontend Testing
Manual Testing Checklist
Authentication
- Login with email/password
- Login with passkey
- Login with Google OAuth
- 2FA flow (TOTP)
- 2FA flow (SMS)
- Logout
Items & Assets
- List items
- Create item
- Update item
- Delete item
- List assets
- Create asset
- Update asset
- Delete asset
Projects
- List projects
- Create project
- View project detail
- Update project
- Delete project
Load Sessions
- Create load session
- Scan asset (in plan)
- Scan asset (not in plan)
- Scan global kit (complete)
- Scan global kit (incomplete)
- Scan project kit
- Qty operations (+1, +5, +10, -1, -5, -10)
- Close session
Kits
- List global kits
- Create global kit
- View global kit detail
- Add asset to global kit
- Add item to global kit
- Remove member from global kit
- List project kits
- Create project kit
- View project kit detail
Inventory
- Create inventory session
- Scan asset in inventory
- View inventory records
- Close inventory session
- View session history
Wallboard
- View overall progress
- View missing items
- View extra items
- View recent scans
- Real-time updates
Integration Testing
Load Session Workflow
-
Setup
- Create a project
- Create items and assets
- Create a global kit
- Create a project kit
-
Planning
- Create load session
- Add plan lines (assets, items, kits)
- Verify plan is correct
-
Loading
- Scan assets in plan
- Scan assets not in plan (confirm)
- Scan global kit (complete)
- Scan global kit (incomplete)
- Scan project kit
- Use qty operations
- Verify status updates
-
Completion
- Check missing/extra items
- Close session
- Verify session is closed
Inventory Workflow
-
Setup
- Create inventory session
-
Scanning
- Scan multiple assets
- Verify records appear
- Check for duplicates
-
Completion
- Close session
- View session history
- Verify records are saved
Error Testing
Test error scenarios:
- Invalid Input: Submit forms with invalid data
- Missing Data: Try to access non-existent resources
- Unauthorized: Try to access without authentication
- Forbidden: Try to access with insufficient permissions
- Network Errors: Test with API offline
Performance Testing
Load Testing
- Test with multiple concurrent requests
- Test pagination with large datasets
- Test real-time polling performance
Frontend Performance
- Check page load times
- Test on mobile devices
- Test with slow network (throttle in DevTools)
Browser Testing
Test in:
- Chrome (latest)
- Safari (latest)
- Firefox (latest)
- Edge (latest)
- Mobile browsers (iOS Safari, Chrome Android)
Accessibility Testing
- Keyboard navigation
- Screen reader compatibility
- Color contrast
- Focus indicators
Best Practices
- Test Before Committing - Always test locally first
- Test All Roles - Test as Loader, Producer, and Admin
- Test Edge Cases - Test boundary conditions
- Test Error Handling - Verify error messages are clear
- Document Issues - Keep track of bugs and fixes
- Regression Testing - Test existing features after changes
Related Topics
- Development Setup - Setting up for testing
- API Development - API testing
- Frontend Development - Frontend testing