1.8 KiB
1.8 KiB
Scripts Directory
This directory contains utility scripts for automation testing.
End-to-End Scripts
complete_profile_to_assessment.py
Purpose: Complete student profile to 100% and navigate to assessments page.
Usage:
# Basic usage with default profile data
python scripts/complete_profile_to_assessment.py --cpid <CPID> --password <PASSWORD>
# With custom profile data from JSON file
python scripts/complete_profile_to_assessment.py --cpid <CPID> --password <PASSWORD> --profile-data profile_data_example.json
# Run in headless mode
python scripts/complete_profile_to_assessment.py --cpid <CPID> --password <PASSWORD> --headless
Example:
python scripts/complete_profile_to_assessment.py --cpid BATBAT311A --password Admin@123
python scripts/complete_profile_to_assessment.py --cpid DESDES29BB --password Admin@123 --profile-data scripts/profile_data_example.json
What it does:
- ✅ Login with smart password handling (tries provided password, then Admin@123 if needed)
- ✅ Handle password reset modal (if new student)
- ✅ Handle profile incomplete modal (if profile < 100%)
- ✅ Complete profile to 100% using provided data (or defaults)
- ✅ Navigate to Assessments page
- ✅ Verify student is assessment-ready
Profile Data Format:
See profile_data_example.json for the expected JSON structure.
Options:
--cpid: Student CPID (required)--password: Student password (required)--profile-data: Path to JSON file with custom profile data (optional)--headless: Run in headless mode (optional)
Other Scripts
complete_journey_test.py
Complete student journey including assessments (full flow).
generate_synthetic_data.py
Generate synthetic student data for testing.
process_students.py
Process multiple students from Excel file.