ZeDaq.ai
Shopper using virtual try-on for a tailored suit

How to Test a Try-On Integration Before Launch

By the ZeDaq.ai team · · 4 min read

On this page
  1. What should you set up before testing?
  2. How do you test the happy path?
  3. How do you test photos that go wrong?
  4. How do you test error codes?
  5. What about slow renders and timeouts?
  6. How do you test on mobile?
  7. How do you test plan limits and cost?
  8. What is the final launch checklist?

To test a virtual try-on integration before launch, run it on a staging site, send real photos and products through it, force the error cases on purpose, and check mobile and plan limits. Then repeat a short version of the same checks on the live store.

This guide is for developers connecting a virtual try-on API to a store. It uses ZeDaq.ai's POST /api/v1/tryon endpoint as the example, and it lists what to test and why.

What should you set up before testing?

Get these ready first:

  • A staging copy of the store, so shoppers never see the test. The guide to testing third-party widgets on staging covers the setup.
  • An API key for the environment you test in. For ZeDaq.ai, the key goes in an x-api-key header, and widget keys are locked to a domain.
  • A set of test photos: a clear full-length photo, a poor one, and a few people with different builds.
  • One product image per garment type you sell.

Keep the key out of public code unless it is a domain-locked widget key.

How do you test the happy path?

Send one good request and check each part of the result.

  1. Post a clear person photo and a product image, with the right garment_type.
  2. Confirm you get an image back, either at once or after the status check.
  3. Display it, and check that the garment in the image is the product you sent.
  4. Confirm that the loading state shows and clears.

Per the API reference, a request can return 200 with the image or 202 with a job ID and a status URL to poll. Test both paths. If you are choosing between polling and callbacks for your own backend, see webhooks versus polling for image jobs.

How do you test photos that go wrong?

Bad inputs happen constantly in the real world, so test them on purpose.

  • A photo that is cropped at the knees.
  • A dark or blurry photo.
  • A file in an unsupported format. The docs list JPEG and PNG.
  • A very large file.
  • A photo with two people.

Check what the shopper sees in each case. They should get a clear message and a way to try again, not a blank screen. Resizing before upload helps, as in image preprocessing before a try-on API call.

How do you test error codes?

Force each error you can and confirm your UI handles it. The API reference lists codes such as:

Error What to test
missing_api_key Remove the header
invalid_api_key Use a wrong key
domain_not_allowed Call from a domain not on the key
tryon_cap_reached Use up the plan's monthly renders
rate_limited Retry after a short wait

Never show the raw error to a shopper. Map each code to a friendly message and log the details for yourself.

What about slow renders and timeouts?

Slow renders are the usual weak spot. Test:

  1. A job that takes longer than normal. Does your loading state hold?
  2. A shopper who closes the modal mid-job. Does polling stop?
  3. A shopper who loses connection. Can they retry?
  4. A maximum wait that you choose. After it, does the page show an error and a retry button?

How do you test on mobile?

Most fashion traffic is on phones, so test there first. Use a real device, not only a browser window.

  • Does the camera or upload picker open?
  • Does the modal fit the screen?
  • Can the shopper reach the close button?
  • Do sticky bars cover any control?

The widget checks in accessibility for product page widgets give you a keyboard and focus pass to add here.

How do you test plan limits and cost?

Find out how your plan counts usage before launch. ZeDaq.ai's Free plan includes 3 try-ons, 3 measurements and 5 invoices a month, and paid plans start with Micro at $14 a month. Every paid plan has a 3-day free trial with no card required.

Per the API reference, a try-on is charged only when a render succeeds. Check that a shopper who hits the cap sees a useful message. Forecasting API usage and cost helps you choose a plan.

What is the final launch checklist?

  • Keys are set for production and locked to the live domain.
  • Happy path works on desktop and mobile.
  • Bad photos give clear messages.
  • Each error code is handled.
  • Slow jobs show a loading state and a timeout.
  • Plan limits and caps are understood.
  • One more pass is done on the live store.

For a wider rollout plan, see the launch checklist for fashion brands, and for timing, how long it takes to launch virtual try-on. If you run a headless store, the Saleor integration guide covers that setup.

Get a key and test your integration

FAQs

Can I test the API without paying?

The Free plan includes 3 try-ons a month, and paid plans have a 3-day free trial with no card required.

Do I need a separate staging key?

Widget keys are locked to a domain, so a staging domain needs a key that allows it. Check the docs and your dashboard for how to set that up.

What image formats should I test?

The API reference lists JPEG and PNG. Test both, plus one unsupported file to check your error message.

How many test photos are enough?

Use a small, varied set: good, poor and different body types. Enough variety matters more than quantity.

Try ZeDaq.ai free

Virtual try-on and Find my size for your store, plus client, order and invoicing tools for tailors, in one subscription.

Related articles