A scan-to-print app can record a successful sale and still leave the operator without a readable ticket. Give the scan, the business transaction and the physical output separate results. The meaning of a successful printer callback depends on the SDK and the printer configuration.
Trace one identifier through the system
Use synthetic data. For example, start with a barcode containing 000427 and assign a separate print-job ID. Preserve the scanned value as text. A numeric conversion would silently lose its leading zeros. Log these events with timestamps and identifiers:
- The app received a scan event and decoded the expected string.
- The service accepted the business transaction and returned its transaction ID.
- The app dispatched a print job against that transaction.
- An operator or scanner verified the physical output using the same test identifier.
Two events with the same barcode can be legitimate: an operator can scan two identical items. Deduplicate retransmissions by event or transaction ID. Suppressing every repeated barcode value would also suppress legitimate scans.
Give an interrupted print its own state
Suppose the app loses power between dispatching job P17 and writing the callback to local storage. On restart, the last durable record might say “dispatched” whether the printer produced the ticket or stopped halfway through. Resending immediately can create two tickets for one accepted transaction.
Keep the original transaction, move P17 to an uncertain state and give the operator a reconciliation step. An authorized reprint should reference P17 and preserve why another copy was needed. Repeating the sale to obtain another ticket makes troubleshooting harder.
Try the failures an operator will see
| Exercise | Evidence to collect |
|---|---|
| Trigger once, then hold the trigger | Scan events per press, app state and enabled input mode |
| Exhaust the paper during a job | Last SDK event, partial output and operator message |
| Kill the app immediately after dispatch | Durable job state after relaunch and whether a ticket exists |
| Print the longest expected receipt | Margins, missing glyphs and barcode readability |
| Scan the printed code back | Exact value compared with the original fixture |
For a broadcast-based scanner, confirm the action, sender restrictions, extra keys and encoding for the actual SDK. Enabling a keyboard wedge and a broadcast receiver for the same scan can produce two app events. Android documents its delivery and security model in the broadcast guide.
Record the media width and mechanism as part of the fixture. For example, the PX-60 specification describes adjustable media up to 58 mm. An 80 mm printer needs its own layout and media tests. Record the printable width in dots separately from the media width.
Disclosure: ChatGPT drafted this article from public technical documentation for AIDC GO. The example is synthetic, and the table describes proposed tests. No device measurements are reported.