2.8 KiB
2.8 KiB
Quick Start - Load Testing Script
What Happened?
The script was using student names instead of CPIDs because:
- CSV column is
"Student CPID"(with space) - Script was looking for
"cpid"or"CPID" - When not found, it used the first column (
"First Name")
✅ FIXED: Script now correctly extracts CPID from "Student CPID" column.
How to Run
1. Basic Test (2 students, visible mode for debugging)
python scripts/load_test_e2e_assessment.py --students 2 --csv students_with_passwords_2025-12-10T12-00-33.csv --no-headless
2. Small Load Test (5 students, headless)
python scripts/load_test_e2e_assessment.py --students 5 --csv students_with_passwords_2025-12-10T12-00-33.csv
3. Medium Load Test (20 students, 5 concurrent)
python scripts/load_test_e2e_assessment.py --students 20 --csv students_with_passwords_2025-12-10T12-00-33.csv --concurrent 5
4. Large Load Test (50+ students, 10 concurrent)
python scripts/load_test_e2e_assessment.py --students 50 --csv students_with_passwords_2025-12-10T12-00-33.csv --concurrent 10
Arguments
--students N: Number of students to test (required)--csv FILE: Path to CSV file (required)--concurrent N: Number of concurrent students (default: 5)--no-headless: Run in visible mode (for debugging)--headless: Run in headless mode (default)
CSV Format
Your CSV should have:
Student CPIDcolumn (orcpid,CPID)Passwordcolumn (orpassword,PASSWORD)- Other student data (First Name, Last Name, etc.)
What It Does
For each student:
- ✅ Login (smart password handling)
- ✅ Password reset (if needed)
- ✅ Profile completion (if needed)
- ✅ Complete ONE domain assessment (all 5 question types)
- ✅ Submit and provide feedback
Expected Output
🚀 Starting flow for: SC309TB0284 (Vijaya Reddy)
✅ Completed: SC309TB0284 (Vijaya Reddy) - success - 245.32s
🚀 Starting flow for: SC3010A037W (M N Suresh Narayanan)
✅ Completed: SC3010A037W (M N Suresh Narayanan) - success - 198.76s
================================================================================
LOAD TEST SUMMARY
================================================================================
✅ Success: 2/2
❌ Failed: 0/2
⏱️ Total Duration: 245.32s
📊 Average per Student: 122.66s
Troubleshooting
"User not found" error
- ✅ FIXED: Script now correctly extracts CPID from CSV
- Verify CSV has
Student CPIDcolumn - Check CPID values are correct
High failure rate
- Reduce
--concurrentvalue - Check backend server capacity
- Verify network stability
Browser crashes
- Reduce
--concurrentvalue - Check system RAM (need ~500MB per concurrent student)
- Use
--headlessmode for better performance
Status: ✅ READY TO USE - CPID extraction fixed!