Skip to content

Launch

Testing

How to test your integration before real visitors use it.

How we set you up for testing

So you can test without spending your own money or disturbing a real person, iungo arranges three things when you ask for access:

  1. A development partner. A key that starts with pk_test_. It behaves exactly like a live key, with one difference: it may also be used on http://localhost addresses, so you can test from your own machine.
  2. A test host. The calls from your development partner ring an iungo account that someone on our team controls, not the real host. Tell us when you plan to test and we will make sure the test host is available and answers.
  3. Test credit. We can add credit to the iungo account you use as the visitor, so you do not need to top up with a card.

Email support@iungo.app to arrange this, and include the exact addresses you will test from, for example http://localhost:3000 and your staging site.

What is real while you test

PartIn testing
Sign-up emailsReal. The code is emailed to the address you enter, so use one you can read.
AccountsReal iungo accounts. The visitor account you create stays on iungo.
Top-upsReal Paystack payments. A card you use is charged. Ask us for test credit instead.
CallsReal video calls to the test host's iungo app, billed from the visitor's wallet.
EventsReal. They arrive on your page exactly as in production.

A test plan

Run through these on the addresses you registered. Each one checks a different part of the integration.

  1. The button opens the window. You see the iungo splash, then the sign-up screen. Nothing loads on your page until the button is clicked.
  2. Sign up. Use an email you control. Confirm auth:signed-in arrives with isNewUser: true.
  3. A complete call. With credit on the account, press the call button, answer on the test host, check video and audio both ways, then end the call. Confirm call:ringing, call:started and call:ended arrive, with reason: 'user_ended' and a duration.
  4. Declined and unanswered calls. Ask the test host to decline one call and to ignore another. Confirm call:ended arrives with declined and missed, and that nothing is charged.
  5. Close in the middle. Close the window with the X, and with Escape, at different steps. Confirm closed arrives and that closing during a call asks before it ends.
  6. Log in again. Reload your page, open the window, and log in with the account you created.
  7. Your security headers. Test on a page that has your real Content-Security-Policy and Permissions-Policy, not only a bare test page.
  8. Devices. Repeat the complete call on a phone, and on each browser your visitors use. Allow the microphone and camera when asked.

Log every event while you test

javascript
window.addEventListener('load', () => {
  const iungo = window.iungoClient()
  const events = [
    'screen', 'auth:signed-in', 'auth:signed-out', 'balance:changed',
    'payment:started', 'payment:completed', 'payment:failed',
    'call:ringing', 'call:started', 'call:ended', 'closed', 'error',
  ]
  for (const type of events) {
    iungo.on(type, (payload) => console.log('[iungo]', type, payload))
  }
})

Testing on localhost

  • The address must match exactly, including the port: http://localhost:3000 and http://localhost:5173 are different addresses.
  • Use the development key (pk_test_…). A live key does not work on localhost.
  • Open the page through the dev server, not as a file from disk.

When everything passes, continue to Going live. The key you will use is pk_live_YOUR_KEY, a different key from the development one.

Something missing or unclear? Tell us.