scan¶
Source code: scan.py
Prompts the operator to input a string of data.
Description¶
This test asks the operator to scan or type a string, usually for provisioning manufacturing info like device serial number or operator’s ID.
Test Procedure¶
A prompt message will be displayed on the UI.
Operator enters a string using a barcode scanner, or by typing on keyboard.
Dependency¶
If bft_fixture is specified, the ScanBarcode and related functions must be implemented to provide scanned data.
Examples¶
To ask the operator to scan the MLB serial number, add this in test list:
{
"pytest_name": "scan",
"args": {
"device_data_key": "serials.mlb_serial_number",
"label": "MLB Serial Number"
}
}
A regular expression can also be specified to check the validity:
{
"pytest_name": "scan",
"args": {
"regexp": ".+",
"device_data_key": "serials.mlb_serial_number",
"label": "MLB Serial Number"
}
}
Test Arguments¶
Name |
Type |
Description |
---|---|---|
label |
str, dict |
Name of the ID or serial number being scanned, e.g., “MLB serial number” |
event_log_key |
str, None |
(optional; default: |
testlog_key |
str, None |
(optional; default: |
shared_data_key |
str, None |
(optional; default: |
serial_number_key |
str, None |
(optional; default: |
device_data_key |
str, None |
(optional; default: |
dut_data_key |
str, None |
(optional; default: |
ro_vpd_key |
str, None |
(optional; default: |
rw_vpd_key |
str, None |
(optional; default: |
save_path |
str, None |
(optional; default: |
regexp |
str, None |
(optional; default: |
check_device_data_key |
str, None |
(optional; default: |
bft_scan_fixture_id |
bool |
(optional; default: |
bft_scan_barcode |
bool |
(optional; default: |
bft_save_barcode |
bool |
(optional; default: |
bft_get_barcode |
bool, str |
(optional; default: |
bft_fixture |
dict, None |
(optional; default:
The default value of |
barcode_scan_interval_secs |
int, float |
(optional; default: |
match_the_last_few_chars |
int |
(optional; default: |
ignore_case |
bool |
(optional; default: |
value_assigned |
str, None |
(optional; default: |