CP_AUTOMATION/scripts
2025-12-12 19:54:54 +05:30
..
ADVANCED_LOAD_TEST_README.md first commit 2025-12-12 19:54:54 +05:30
check_profile_tabs.py first commit 2025-12-12 19:54:54 +05:30
complete_journey_test.py first commit 2025-12-12 19:54:54 +05:30
complete_profile_and_analyze.py first commit 2025-12-12 19:54:54 +05:30
complete_profile_to_assessment.py first commit 2025-12-12 19:54:54 +05:30
comprehensive_dom_verification.py first commit 2025-12-12 19:54:54 +05:30
debug_dom_inspector.py first commit 2025-12-12 19:54:54 +05:30
debug_password_reset.py first commit 2025-12-12 19:54:54 +05:30
debug_question_29.py first commit 2025-12-12 19:54:54 +05:30
debug_question_detection.py first commit 2025-12-12 19:54:54 +05:30
diagnose_issues.py first commit 2025-12-12 19:54:54 +05:30
generate_synthetic_data.py first commit 2025-12-12 19:54:54 +05:30
load_test_e2e_assessment_advanced.py first commit 2025-12-12 19:54:54 +05:30
load_test_e2e_assessment.py first commit 2025-12-12 19:54:54 +05:30
LOAD_TEST_ISSUES_FIXED.md first commit 2025-12-12 19:54:54 +05:30
LOAD_TEST_README.md first commit 2025-12-12 19:54:54 +05:30
process_students.py first commit 2025-12-12 19:54:54 +05:30
profile_data_example.json first commit 2025-12-12 19:54:54 +05:30
quick_dom_check.py first commit 2025-12-12 19:54:54 +05:30
QUICK_START_LOAD_TEST.md first commit 2025-12-12 19:54:54 +05:30
README.md first commit 2025-12-12 19:54:54 +05:30
RUN_LOAD_TEST_500_STUDENTS.sh first commit 2025-12-12 19:54:54 +05:30
test_complete_flow.py first commit 2025-12-12 19:54:54 +05:30
test_complete_student_journey.py first commit 2025-12-12 19:54:54 +05:30
test_profile_filling_with_screenshots.py first commit 2025-12-12 19:54:54 +05:30
test_single_student.py first commit 2025-12-12 19:54:54 +05:30
test_single_user_assessments.py first commit 2025-12-12 19:54:54 +05:30
validate_dom_locators.py first commit 2025-12-12 19:54:54 +05:30
verify_all_tests_independent.py first commit 2025-12-12 19:54:54 +05:30
verify_conditional_attributes.py first commit 2025-12-12 19:54:54 +05:30
verify_current_dom.py first commit 2025-12-12 19:54:54 +05:30
verify_data_testid_implementation.py first commit 2025-12-12 19:54:54 +05:30
verify_toast_dom_direct.py first commit 2025-12-12 19:54:54 +05:30
verify_ui_team_implementation.py first commit 2025-12-12 19:54:54 +05:30

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:

  1. Login with smart password handling (tries provided password, then Admin@123 if needed)
  2. Handle password reset modal (if new student)
  3. Handle profile incomplete modal (if profile < 100%)
  4. Complete profile to 100% using provided data (or defaults)
  5. Navigate to Assessments page
  6. 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.