Test with real assessments
Create and publish assessments in your Edpire dashboard before testing your integration. Your API key gives access to the same assessments your learners will see — no separate test environment needed.Keeping test data out of your real numbers
Edpire does not run a separate sandbox environment, and there is noedp_test_ key type. Test submissions are real submissions, so if you send them into your production organization they land in your analytics and your usage counters.
Create a second organization for development. It is the recommended pattern and it costs nothing:
- Sign up a second organization (for example “Acme — Sandbox”)
- Create its own API key under Integrations
- Register your
localhostand staging domains under Integrations → Security - Copy or rebuild the handful of assessments you need to test against
Load testing and attack simulation are different and need our involvement. Do not run them
against production. Request a pen test window as described in
Security Posture, at least 5 business days ahead.
Test the complete flow end-to-end
Before going live, run through the full learner journey with your chosen integration pattern:Hosted Redirect
Hosted Redirect
- Build the share URL with your assessment’s share code
- Open it in a private browser window (to simulate a fresh learner session)
- Complete the assessment
- Verify the redirect lands on your
return_urlwithsubmission_id,score, andmax_scoreappended - Fetch the submission via
GET /api/v1/submissions/{id}and confirm the response shape matches your data model
Embedded Player
Embedded Player
- Mint an embed token from your server via
client.mintEmbedToken() - Call
EdpireAssessment.mount({ token, container })in the browser - Complete the assessment — verify the player mounts, renders questions, and accepts answers
- Submit and confirm
onCompletefires with the correctresultshape - Verify per-question feedback is shown inline after submission
Custom Flow
Custom Flow
- Fetch an assessment through your backend proxy and flatten with
flattenAssessment() - Render each step with your custom UI using
EdpireQuestionorrenderQuestion - After each answer, call your
/checkproxy — verifyfeedbackshape matches the question type - Confirm
correct: truefeedback is returned for known-correct answers - After all questions, submit via
client.submit()and verify the full submission record
Test webhooks locally
Your local server isn’t reachable from Edpire’s servers directly. Use ngrok or Cloudflare Tunnel to expose a local port:secret from the response. Complete an assessment — the webhook fires to your local handler in real time.
Verify signature verification
Confirm your signature verification logic rejects tampered requests:Test idempotency
The same webhook event can be delivered more than once. Your handler must be safe to call twice with the same payload:- Complete an assessment — your handler processes the
submission.gradedevent - Replay the exact same POST body to your webhook handler (copy from ngrok’s request log)
- Verify your database has exactly one record, not two
Test error paths
Don’t only test the happy path. Verify your integration handles:Pre-production checklist
There is no separate test key type: you develop and go live with the sameedp_live_ key (see Keeping test data out of your real numbers below). This is the list to work through before you point real learners at the integration:
- All API calls go through your server — no
edp_live_keys in the browser -
return_urlandback_urlmatch Allowed API & Redirect Origins; embedding pages match Allowed Embed Origins - Webhook signature verification is enabled and tested
- Idempotency check is in place for
submission.graded - Error responses are handled (retry on 429/500, alert on persistent 5xx)
-
learner_refis your stable internal user ID — not email, not username -
EDPIRE_API_KEYis in environment variables, not committed to source control