# Hello World Example URL: /examples/hello-world The canonical OpenHTF hello_world.py example explained — one phase, one measurement, a JSON output callback and a DUT ID prompt — with its console and JSON output. The smallest useful OpenHTF test: one phase that logs a line and sets a string measurement, written to a JSON file named after the DUT. Based on `examples/hello_world.py`. Declares the measurement before the phase runs. With no validator, any value passes; an unset value fails. Measurements → The right way to log from a phase: the record's `log_records` and the Operator UI both receive it, unlike `print()`. Logger → Output callback writing one file per run. The pattern accepts any record field. Output Callbacks → A start-trigger phase that prompts for the DUT ID on the console (and in the Operator UI when one is running). Device Under Test → `SN1234.hello_world.json`, trimmed: The start trigger is itself a phase and appears first in `phases[]` as `trigger_phase` (omitted above). Every field is documented in the JSON format reference. Skip the prompt while developing: `test.execute(test_start=lambda: 'SN1234')`. Print failures to the console as well: `test.add_output_callbacks(console_summary.ConsoleSummary())`. Send the record to a database in addition to the file: `test.add_output_callbacks(upload())` from `tofupilot.openhtf` — Manufacturing Test Analytics.