Skip to content

faizalcodes/selenium

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Venture Intelligence Test Suite - File Organization

Files Created/Modified:

1. login_test_case.py

Purpose: Tests login functionality only Test Cases:

  • test_invalid_login() - Tests invalid credentials rejection
  • test_successful_login() - Tests successful login and dashboard redirect

Features:

  • ✅ Browser initialization and cleanup
  • ✅ Login validation
  • ✅ Clear test reporting
  • ✅ Can be run independently

Usage: python login_test_case.py

2. dashboard_test_case.py

Purpose: Tests dashboard "All Time Figures" sections Test Cases:

  • test_all_time_figures_sections() - Validates all 4 dashboard sections have data

Features:

  • ✅ Auto-login check (logs in if needed)
  • ✅ Finds sections by width (30%, 22%, 22%, 13%)
  • ✅ Validates labels and values in each section
  • ✅ Comprehensive reporting of found/missing sections
  • ✅ Screenshot on error
  • ✅ Can be run independently

Usage: python dashboard_test_case.py

3. main.py

Purpose: Orchestrates both test suites Options:

  1. Run ALL tests (Login → Dashboard)
  2. Run LOGIN tests only
  3. Run DASHBOARD tests only
  4. Exit

Features:

  • ✅ Sequential execution (Login first, then Dashboard)
  • ✅ Comprehensive reporting across both test suites
  • ✅ User-friendly menu interface
  • ✅ Combined success/failure reporting

Usage: python main.py

Test Flow:

When running main.py:

  1. Phase 1: Login Tests

    • Invalid login test (standalone)
    • Valid login test (establishes session)
  2. Phase 2: Dashboard Tests

    • Checks if already logged in
    • Logs in if needed
    • Tests all 4 "All Time Figures" sections
    • Validates each section has label and value

Expected Results:

  • Test Case 1 (Login): ✅ SUCCESS if login works
  • Test Case 2 (Dashboard): ✅ SUCCESS if all 4 sections found with data

Key Improvements:

  1. Separation of Concerns: Login and Dashboard tests are now separate
  2. Reusable Components: Each test file can run independently
  3. Better Error Handling: More detailed error reporting and debugging
  4. Session Management: Dashboard tests auto-login if needed
  5. User Experience: Clear menu and comprehensive reporting
  6. Debugging: Screenshots saved on dashboard test failures

Running the Tests:

Option 1: Run Everything

python main.py
# Select option 1 or just press Enter

Option 2: Test Login Only

python login_test_case.py
# OR
python main.py
# Select option 2

Option 3: Test Dashboard Only

python dashboard_test_case.py
# OR
python main.py
# Select option 3

Files Backed Up:

  • login_test_case_old.py - Original login test file
  • dashboard_test_case_old.py - Original dashboard test file

The new structure provides better modularity, clearer test separation, and improved user experience while maintaining all the original functionality.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages