# Testing (/docs/risk/testing)

Sandbox (`coss_test_…`) keys assess like live ones, with their own counters, memory and lists, and
these test inputs (documentation addresses and `.test` domains, which never belong to real users):

| Input                       | Behaves as                                          |
| --------------------------- | --------------------------------------------------- |
| IP `192.0.2.1`              | A Tor exit node in Germany (`ip.tor`)               |
| IP `192.0.2.2`              | An AWS server in the US (`ip.hosting_provider`)     |
| IP `192.0.2.3`              | A VPN exit in Romania (`ip.vpn`, `privacy.vpn`)     |
| IP `192.0.2.4`              | A proxy in the UK (`ip.proxy`)                      |
| IP `192.0.2.5`              | iCloud Private Relay in the UK (`ip.relay`)         |
| Any other `192.0.2.x`       | A home connection in the UK (no reason)             |
| Email `…@disposable.test`   | A disposable domain (`email.disposable`)            |
| Email `…@undeliverable.test` | A domain that can't receive mail (`email.undeliverable`) |
| Email `…@new.test`          | A domain registered 2 days ago (`email.domain_new`) |
| Any other `….test` domain   | A domain that receives mail (no DNS lookup)         |
| Captcha token `test-pass`   | A token the provider accepts                         |
| Captcha token `test-fail`   | A token the provider refuses (`captcha.failed`)      |
| Content with `[coss-test:phishing]` | Scores 0.99 in that category (any of `spam`, `phishing`, `malware`, `fraud`) |
| Content with `[coss-test:spam:0.4]` | Scores exactly 0.4 in that category |
| Any other content           | Scores 0.01 in every category (no model call)        |
| Device token `test-device:<name>` | An ordinary browser whose id is `<name>` (the same name again: `duplicate.device`) |
| Device token `test-device-automated` | An automated browser (`device.automation`) |
| Phone `+12025550101`        | A landline                                           |
| Phone `+12025550102`        | A non-fixed VoIP number (`line_type: "non_fixed_voip"`) |
| Phone `+12025550103`        | A fixed VoIP number                                  |
| Phone `+12025550104`        | A mobile whose SIM changed 6 hours ago (`sim_swap.recent`) |
| Phone `+12025550199`        | A number that doesn't exist (`valid: false`)         |
| Any other `+120255501xx`    | An ordinary US mobile                                |

The captcha test tokens work without a captcha provider in the settings, content markers
without any model, and the `192.0.2.x` addresses always have VPN, proxy and relay data (`privacy`; other addresses
have none in sandboxes);
real tokens from [`coss/device`](/docs/risk/devices) work too; sandbox classifications don't count against the organization's limit.
[Email, IP and phone checks](/docs/risk/lookups) see the same test addresses; phone checks in sandboxes
know only the numbers above (others are just checked for syntax) and never count against the organization's limit. Typos (`@gmail.con`), role
accounts (`info@`), velocity, duplicates, login history, feedback, lists, rules and settings work as
in live environments.

```ts twoslash
import { Coss } from "coss";
// A sandbox key: coss_test_…
const coss = new Coss();
// ---cut---
const { data } = await coss.risk.assess({
  event: "signup",
  user: { email: "x@disposable.test" },
  ip: "192.0.2.1",
});
// data?.decision === "block": a disposable address over Tor
```
