Overview
The CitizenGO Live Testing Interface (LTI) is a Django-based platform that runs automated Selenium browser tests against CitizenGO's donation forms and petition pages. It schedules tests, tracks results, monitors payment gateways, and presents everything through a web dashboard.
What it does
- Automated browser testing — Selenium drives Chrome to test donation forms, currency pickers, payment methods, petitions, and more
- Real donation verification — Makes actual test donations and verifies they arrive in Salesforce
- Payment gateway monitoring — Collects transaction data from Stripe, PayPal, and GoCardless
- Scheduled execution — Tests and tasks run on cron schedules, recurring automatically
- KPI dashboard — Real-time pass rates, streak tracking, and system health metrics
- Email reports — Automated reports sent to stakeholders
Architecture
┌──────────────┐ ┌──────────────┐ ┌──────────────┐
│ Django │────│ MySQL │────│ Cron │
│ Web App │ │ Database │ │ Scheduler │
└──────┬───────┘ └──────────────┘ └──────┬───────┘
│ │
│ ┌──────────────┐ │
└──────────────│ Selenium │───────────┘
│ Chrome │
└──────┬───────┘
│
┌──────────────┐
│ CitizenGO │
│ Websites │
└──────────────┘
The Django app serves the dashboard, scenario control plane, and Agent API. A scheduler polls at a configurable interval no longer than three minutes and picks up due tests and tasks. Selenium drives legacy deterministic checks while the private visual runner executes versioned manual-AI scenarios through the outbound Agent API bridge. Results and redacted evidence are stored in MySQL and displayed on the dashboard.
Tech Stack
| Layer | Technology |
|---|---|
| Framework | Django 4.2.7 |
| Language | Python 3.11 |
| Database | MySQL 8.0 |
| Browser automation | Selenium 4.31 + Chrome |
| Task scheduling | django-cron |
| Production server | Gunicorn + Nginx |
| External APIs | Salesforce, Stripe, PayPal, Asana, Sentry, Gmail |
| Data processing | pandas, numpy |
| Containerization | Docker (optional) |
Project Structure
├── main/ # Django project config (settings, urls)
├── test_interface/ # Main Django app
│ ├── models.py # ScheduledTest, ScheduledTask, etc.
│ ├── views.py # Dashboard, reports, API endpoints
│ ├── cron.py # Cron job definitions
│ ├── helpers/ # API integrations (Salesforce, Stripe, etc.)
│ ├── unittests/ # Selenium test implementations
│ ├── templates/ # HTML templates
│ └── static/ # CSS, JS, images
├── features/ # BDD test scenarios (Behave)
├── docs/ # Documentation source (markdown)
└── Docker/ # Container configuration
Next Steps
- Installation — Get it running locally
- Tests — All 14 test types explained
- Tasks — The 5 automated task types
- Website — Dashboard and report pages
- Configuration — Settings reference
- Docker — Container deployment
- Q3 LTI evolution decision — Implementation direction and promotion gates
- Q3 environment matrix — Approved acceptance endpoints and boundaries
- Q3 synthetic data — Test identities, cleanup, and retention
- Q3 dependency contracts — Cross-system assertions, owners, and readiness gates