# Testing

> Test leads run the whole pipeline with your live key and are held before any buyer receives them.

## Test mode

Add `"icon_is_test_lead": true` to a search and to its submit.

> Test mode: held before any buyer receives it (TEST_LEAD_HELD).

A test lead:

- runs the live pipeline with your live key and campaign, with three differences: a test search lists every ranked offer (a school can appear more than once), buyers are not contacted, and the person-level duplicate check does not run;
- answers `code: "TEST_LEAD_HELD"`, `status: "held"`, `reason: "Test lead held"` on submit, with `payout: 0`, `submitted: false` and `test_lead: true`; `success` and `accepted` look like the live answer, so your flow runs as it would;
- is **never delivered** to a school and never counted (no sale, no cap use, no payout);
- stays a test lead: a later call for the same lead cannot make it live.

## A test plan

1. Search with a test lead; check that you receive results and that `processing_done` turns `true`.
2. Show a result with its consent statement; submit it with the test flag; expect `TEST_LEAD_HELD`.
3. Leave out a required answer; expect `REQUIRED_FIELD_MISSING` naming the field.
4. Try the [duplicate pre-check](https://developers.iconroute.io/api/dupe-check/) with raw and hashed fields.

Test leads count toward your [rate limits](https://developers.iconroute.io/rate-limits/).

## Going live

Remove the test flag. Tell your ICON contact before your first live lead so they can watch it through.
