# Test Record JSON Format URL: /reference/json-schema Field-by-field reference for the JSON file OpenHTF's OutputToJSON writes — top-level record, metadata, phases, measurements, validators, units, attachments, subtests, branches, checkpoints, diagnoses, log records — with a complete annotated sample. `json_factory.OutputToJSON` serializes the in-memory `TestRecord` with the fields below (key order in the file: `dut_id`, timestamps, `outcome`, `outcome_details`, `marginal`, `metadata`, `phases`, `subtests`, `branches`, `diagnosers`, `diagnoses`, `log_records`, `station_id`, `code_info`). Checkpoint evaluations are kept in memory (`TestRecord.checkpoints`) but are not written to JSON in 1.6.1. The format has been stable since 1.5; 1.6 added nothing incompatible. Timestamps are milliseconds since the Unix epoch, enums are their string names. A two-phase functional test, trimmed to the essentials: Iterate `phases[]`, then `measurements` values; do not assume measurement names are unique across phases. A multi-dimensional `measured_value` is a list of rows; the last element of each row is the value, the preceding ones are the coordinates in `dimensions` order. `outcome_details[0].description` holds the traceback summary for `ERROR` runs. Repeated phases appear as several entries sharing `descriptor_id` and `name`; only the last has the final outcome. File size is dominated by `attachments[].data` when inlined; write attachments elsewhere with `inline_attachments=False` if you index the JSON. TofuPilot's import and `upload()` callback read this exact format — phases, measurements with limits and units, attachments and logs — see Manufacturing Test Analytics.