- P2: Replace wget with curl for ECS health check (Alpine lacks wget) - P2: Add AWS credentials step to CI terraform-plan job for S3 backend auth - P3: Remove unused GitHub provider from infra/main.tf Co-Authored-By: Paperclip <noreply@paperclip.ing>
ShieldAI Load Tests
k6 load testing suite for ShieldAI services.
Prerequisites
- k6 v0.45+ installed
- Target services running on staging environment
- Authentication tokens for API access
Running Tests
Local Execution
# Run against local development environment
k6 run --env BASE_URL=http://localhost:3000 --env AUTH_TOKEN=dev-token src/darkwatch.js
# Run with results output
k6 run --out json=results.json src/darkwatch.js
CI/CD Execution
# Run on staging environment
k6 run --env BASE_URL=https://staging-api.freno.me --env AUTH_TOKEN=$STAGING_AUTH_TOKEN src/darkwatch.js
Test Configuration
Each test script includes:
- Stages: Ramp-up, sustained load, ramp-down
- Thresholds: P99 latency and error rate limits
- Metrics: Custom metrics for error tracking
Current Thresholds
| Service | P99 Latency | Error Rate |
|---|---|---|
| Darkwatch | < 200ms | < 1% |
Metrics Collection
Run with output options:
# JSON output for analysis
k6 run --out json=darkwatch-results.json src/darkwatch.js
# InfluxDB for visualization
k6 run --out influxdb=http://influxdb:8086/k6 src/darkwatch.js
Next Steps
- Create load test scripts for Spamshield and Voiceprint
- Integrate with GitHub Actions CI pipeline
- Set up metrics visualization dashboard
- Configure alerting on threshold breaches