Skip to main content

Full Application End-to-End Test Plan

1. Objective

  • Validate the entire Learnille platform end-to-end with real data and real services under production-like conditions
  • Coverage spans all user personas (Student, Instructor, Consultant, Admin) and their complete workflows
  • Validate cross-cutting features (chat, notifications, scheduling, payments, analytics)
  • Currency support: USD as primary payment method; NGN for payouts; EUR/GBP if endpoints exist
  • Tests organized by user workflow with comprehensive scenario coverage

2. Scope (In/Out)

In Scope:

  • Complete user workflows from registration to advanced platform usage
  • Student learning lifecycle (discovery → enrollment → completion → certification)
  • Instructor business lifecycle (course creation → publishing → student management → earnings)
  • Consultant service lifecycle (service setup → booking management → session delivery → payouts)
  • Admin platform management (user oversight → content moderation → financial management)
  • Cross-user interactions and real-time features
  • Payment processing across all contexts
  • Multi-currency support where implemented

Out of Scope:

  • Mocked or unit tests (this is real E2E only)
  • Internal tooling not exposed to users
  • Performance load testing (covered separately)
  • Third-party service mocking

3. User Workflow Test Files

  • Student Workflow: server/test/e2e/student-workflow.e2e-spec.ts
    • Registration → Course Discovery → Enrollment → Learning → Completion → Consultation Booking
  • Instructor Workflow: server/test/e2e/instructor-workflow.e2e-spec.ts
    • Registration → Course Creation → Content Management → Publishing → Analytics → Earnings
  • Consultant Workflow: server/test/e2e/consultant-workflow.e2e-spec.ts
    • Registration → Service Setup → Availability Management → Session Delivery → Financial Management
  • Admin Workflow: server/test/e2e/admin-workflow.e2e-spec.ts
    • Platform Oversight → User Management → Content Moderation → Financial Processing
  • Integration Flows: server/test/e2e/payment-integration.e2e-spec.ts, server/test/e2e/communication-flows.e2e-spec.ts
  • Multi-User Scenarios: server/test/e2e/multi-user-scenarios.e2e-spec.ts

4. Environment & Data Strategy

  • OpenAPI surface will guide endpoint expectations, but we will also rely on the codebase as truth. We’ll wire tests to real endpoints in the app.
  • Environment: test/e2e:dev with environment injection
  • Seed data per flow: dynamic in-test seeds to ensure isolation

5. Test Data Model & Seed

  • Entities: users by persona (student, instructor, consultant, admin), consultant profiles, courses, consultations, bookings, sessions, payments, wallets, and chat messages.
  • Currencies: USD (primary), NGN (payout); EUR/GBP optional if endpoints exist
  • Data isolation: unique IDs per test run; cleanup hooks where feasible

6. Test Execution Strategy

Execution Order:

  1. Student Workflow → Instructor Workflow → Consultant Workflow → Admin Workflow
  2. Payment Integration → Communication Flows → Multi-User Scenarios
  3. Analytics and Reporting validation

Verification Approach:

  • End-to-end workflow validation with real API calls
  • Status transition verification at each step
  • Data consistency checks across related entities
  • Cross-user permission validation

Error Handling:

  • Fail-fast on missing critical endpoints
  • Graceful degradation for optional features
  • Comprehensive logging via existing logRes utility
  • Automated cleanup on test failure

7. Currency Coverage & Gatekeeping

  • USD is the sole major path for tests; NGN is tested for payouts with currency-specific paths
  • If EUR/GBP endpoints and payout wiring exist, we can run them tonight as a supplementary test block; otherwise we skip them with blockers in the gaps doc

8. CI/CD & Scheduling

  • Nightly CI job to run all e2e flows; artifacts saved (XML, JSON, logs)
  • PR gating: to be considered after the first successful night

9. Execution Commands & Debugging

Run Commands:

# Run all comprehensive workflow tests
npm run test:e2e:dev

# Run specific workflow test
npm run test:e2e:dev -- student-workflow.e2e-spec.ts

# Run with verbose output for debugging
npm run test:e2e:dev -- --verbose

# Run with open handles detection
npm run test:e2e:dev -- --detectOpenHandles

Logs & Artifacts:

  • Test logs: server/test/logs/e2e-tests.log
  • Test reports: Standard Jest output with enhanced workflow reporting
  • Debug logs: Use logRes utility with existing E2E_DEBUG environment variable

10. Deliverables

  • All per-flow e2e spec files
  • Consultation booking big e2e spec file (tonight’s primary work)
  • Gap doc, Endpoint map (optional), currency strategy, and runbook

10. Updated Deliverables

Test Files:

  • Complete user workflow test suites for all personas
  • Cross-platform integration test suites
  • Enhanced test data management utilities
  • Comprehensive validation helpers

Documentation:

  • Updated test execution guidelines
  • Test data consistency documentation
  • Workflow coverage reports
  • Gap analysis and recommendations