# Test Options URL: /test-options Reference for test.configure() in OpenHTF — test name, stop_on_first_failure, failure_exceptions, default_dut_id, diagnosers and output_callbacks — plus Test.execute() arguments. Test-wide switches live on `TestOptions` and are set with `test.configure(**kwargs)` before `test.execute()`. Test name written to `metadata.test_name`. Default `'openhtf_test'`. Passing `test_name=` as a keyword to `htf.Test()` sets the same field. Stop the test as soon as any measurement fails validation. Default `False` — by default OpenHTF runs every phase and reports all failures. Also settable via the `stop_on_first_failure` configuration key, which is handy for toggling it per station. Finer control: checkpoints. Exceptions that should mark the run `FAIL` instead of `ERROR`. By default any unhandled exception in a phase ends the test with outcome `ERROR` (a problem with the test, not the DUT). List the exception types that mean "the DUT is bad" — a timeout waiting for the DUT to boot, a protocol error from the DUT — and the outcome becomes `FAIL`, which keeps yield statistics honest. DUT ID used if neither the start trigger nor any phase set one. Default `'UNKNOWN_DUT'`. See the ignore early-canceled tests example. Test-level diagnosers that run after all phases with the full record. Replace the callback list. Prefer `test.add_output_callbacks(...)`, which appends; pass `[]` here to clear. `test.configure()` also parses command-line arguments once (`-v`, `--config-file`, `--config-help`, see CLI flags) and configures logging, so call it before any manual `argparse` of your own, or use `parents=[htf.util.argv.module_parser()]`-style composition. Either a trigger phase (typically `user_input.prompt_for_test_start()`) or a zero-argument function returning the DUT ID (`lambda: "SN1234"`). If omitted, the DUT ID must be set by a phase or falls back to `default_dut_id`. See Device Under Test. Write cProfile statistics of the run to this file. Useful to find a slow phase. `True` if the outcome is `PASS`, else `False`. Lets a wrapper script exit non-zero on failure. `execute()` runs one DUT. For a station that tests units back to back, loop around it — the frontend example does this five times with the Operator UI open. Keyword arguments to `htf.Test(*phases, **metadata)` are stored in `test_record.metadata`. `config` is reserved. Details on the Test Record page. Some behaviour is configured through the configuration system rather than `configure()`: `station_id`, `allow_unset_measurements`, `capture_source`, `station_server_port`.