Protocol conformance tests

The suite now lives inside the explorer itself.

Run the conformance tests

Why it moved. This page used to load the explorer in a hidden frame and drive its decoder from the outside. That works over http, but not when the files are opened straight from disk: the browser gives every file:// document its own unique origin, so one page cannot reach into another — it does not merely return nothing, it throws.

Running the tests inside the explorer avoids that entirely, works from a hosted copy and a saved offline copy alike, and has a genuine advantage: the tests exercise the code in that very file, so they verify the copy you are actually holding rather than a copy of the logic.

What it checks

Eighty-four assertions: sixty-two across all fifteen commands plus framing, request encoding and the read-only guard, and twenty-two more that run every simulator fault through the analyser. Each response is built to the layout documented in the Veeder-Root TLS-4xx RS-232 Serial Commands Manual, and every decoded field is compared against the value that was encoded — so a parser reading the right bytes from the wrong offsets fails rather than quietly producing plausible numbers.

Simulator faults. When served over http, the suite also loads the console simulator in a hidden frame and pushes every fault mode it offers — all nineteen, including loopback and echo — through the analyser, one fault at a time against every command the simulator knows. Each must raise the anomaly its help text promises and nothing it should not; conformant frames must raise none. The group also checks coverage both ways, so a fault added to the simulator without an expectation here is a failure, not a silent gap. From a saved offline copy this group is reported as skipped, never as passed, because a file:// page cannot reach into the frame.

The suite is itself checked for teeth: deliberately reverting the checksum, the liquid-sensor alarm table, the input status names and the tank bound each produce failures. A green run means something.

Verifying a customer's copy

If a report ever looks doubtful, ask them to add ?selftest to the address of the page or file they ran and send a screenshot. It confirms whether their build's protocol arithmetic was sound, without needing them to re-run anything against the console.

Serving locally, if you want to

Needed only for the simulator-fault group; everything else runs from disk:

python -m http.server 8765

then open http://localhost:8765/index.html?selftest.