How do I test results that arrive over time?
Three sandbox scenarios send quotes at about 3, 12, and 20 seconds, with the cheapest last.
Live quotes can arrive while a request is still running, but most sandbox scenarios answer at once. To test how your product shows quotes as they arrive, use one of these scenarios:
Send the scenario ID in the scenario field of one quote request, or select it for the workspace. See Sandbox scenarios.
What happens
- Three mock offers arrive about 3, 12, and 20 seconds after the request starts.
- The last offer is the cheapest, so you can check that your list sorts again when a new quote arrives.
- While the request runs, a read shows the quotes that arrived so far, with the status
in_progressand the reasoncollecting. - The request completes after the third offer.
- Each arrival sends the events that a live carrier answer sends, in the same order. See Webhooks.
What to check
- Your product shows the first quote while the request is still running.
- Each new quote joins the list without a reload, and the list stays in your order.
- Your reads wait for the result as Get quote results describes, and stop once the request finishes.
Live renters quotes arrive together. See How long until quotes finish?.