Test Execution#
Overview#
A Test Execution in Fuze™ Test is a serial flow of procedural test steps. These steps are grouped into test suites made up of test cases, which in turn reference executable scripts and hardware commands.
Executions are managed by the Product Test Adapter (PTA) runtime.
Invocation#
To run a test execution:
python product-test-adapter.py --cmd startTest --config testbed_config.json
Where testbed_config.json includes references to DUTs, hardware interfaces, and test content paths.
Test Suites and Cases#
Test content is stored in JSON files using the following naming convention:
tc_<name>.json
Examples:
tc_flash_stm32.json
tc_bootloader_verify.json
Each test case may reference one or more scripts located under:
producttest/testcases/scripts/
Example JSON test case:
{
"desc": "Flashes firmware onto STM32 device",
"script": "load-image-into-stm32.py",
"args": ["--image", "firmware_v1.2.hex"]
}
Execution Flow#
Configuration Load: - DUTs, acquisition, results, environment setup.
Test Suite Load: - All tc_*.json files are scanned and parsed.
Per-Test Execution: - Scripts or shell commands invoked in sequence. - Arguments are passed through args.
Logging and Results: - Output is streamed and stored in results/.
Parallel Execution#
Fuze™ Test is designed for single-threaded test execution by default.
Parallelization must occur externally: - Run multiple CLI invocations in parallel terminals - Use CI/CD runners or subprocess pools - Assign different DUTs to each parallel job
Environment and Debug#
Enable verbose logging:
export FUZE_DEBUG=1
Run a dry test (validation only):
python product-test-adapter.py --cmd validateSuite --config testbed_config.json
Error Codes#
0: Success
1: Configuration or JSON parsing error
2: Test script crash or unhandled exception
3: DUT unavailable or unreachable
4: Result handling failure