Component test reference
Configuration
The verifier.yaml reference
Verifier reads a YAML file (verifier.yaml by default)
that tells it where to find your model, how to start your component,
which transport to use, and how many attempts to make. Three keys are
required: flex_json_paths, commands, and
license_file. Everything else has a default.
Pass a different file with verifier -c FILE run or
verifier -c FILE doctor. Changes to the file after Verifier
starts have no effect on the current run.
Minimal Configuration
The smallest configuration that runs a test:
flex_json_paths:
- ./sensor.json
license_file: ./license.zip
serializer: direct
commands:
- command: /usr/local/bin/sensor
startup_ms: 500
transports:
- name: main
type: zmq
settings:
pub_socket:
ip: 127.0.0.1
port: 6667
type: Connect
sub_socket:
ip: 127.0.0.1
port: 6668
type: Connect
Run verifier doctor to check the configuration before
running a test. Transport configuration is covered in verifier docs open transports.
Test Options
flex_json_paths: Required List of paths to compiled Flex JSON model files. Verifier loads all of them and merges their type environments.timeout_ms: Optional (Defaults to1000) How long Verifier waits for an expected message, in milliseconds, before recording a timeout.test_type: Optional (Defaults tovalid) The kind of messages to generate. Values are case-insensitive:valid: messages that satisfy every constraintinvalid: messages that violate at least one constraintrandom: unconstrained random messages.randis also accepted.
iterations: Optional (Defaults to1) How many times to run the full set of protocols. Each iteration tests every protocol from a fresh start. The keyrerunsis still accepted on read as a deprecated alias.attempts: Optional (Defaults to1) How many attempts each protocol gets per iteration. The CLI flag--retriesoverwrites this value when given;attemptsapplies whenever the flag is absent.seeds: Optional List of seeds for the random number generator (std::mt19937_64). One seed is consumed per iteration; if more iterations run than seeds are provided, Verifier generates the remainder. A fixed seed list makes every run produce the same generated values.component: Optional Fully-qualified name of the component under test. Required when the model declares more than one component; omit it when there is exactly one.verifier initfills this in for you: it reads the model and has you pick from the components it declares, or writes the name outright when the model declares only one.passive: Optional (Defaults tofalse) When true, Verifier listens on all configured connections and validates only what it receives. It never sends.license_file: Required Path to the license bundle.verifier runfails without it, andverifier doctorreports an error. The file itself may be mounted at runtime; doctor warns rather than errors when the key is set but the file is not on disk yet.proto_file_map: Optional Path toproto_file_map.txt, required only when using the Protobuf serializer and Verifier cannot find the file automatically in the Flex package.profile: Not yet implemented. Accepted without an unknown-key warning; currently has no effect.
Serialization Options
serializer: Optional (Defaults todirect) Default serializer for all packages. Values are case-insensitive:direct: raw binaryjson: JSONprotobuf: Protocol Bufferscsv: CSVlmcp: LMCPmavlink: MAVLinkoms20xml: OMS 2.0 XMLros: ROSstanag4586: STANAG 4586uai: UAIwosa: WOSAxml: XML
package_serializers: Optional Per-package serializer overrides. Maps a fully-qualified package name (e.g.,MyPackage::v1) to a serializer value from the list above. Packages not in the map use the defaultserializer.
Example:
serializer: direct
package_serializers:
MyPackage::v1: json
OtherPackage: protobuf
Generation Options
The generation section controls how Verifier generates
message content.
recursionDepth: Optional (Defaults to20) Maximum depth the generation engine recurses into nested message fields. Verifier logs an informational message on passing 80% of this value and a warning when it stops descending at the cap.listLimits: Optional Default length range for generated lists:minLength: Optional (Defaults to0) Minimum number of elementsmaxLength: Optional (Defaults to10) Maximum number of elements. Must not be less thanminLength.
floatLimits: Optional Default value range for generated floats:min: Optional (Defaults to-1000000.0) Minimum float value. Set toNonefor no lower bound.max: Optional (Defaults to1000000.0) Maximum float value. Set toNonefor no upper bound. Must not be less thanmin.
Model constraints override these defaults for the fields they cover.
When reading or writing these with verifier config, the
float bounds are addressed as
generation.floatLimits.minValue and
generation.floatLimits.maxValue, even though the YAML keys
are min and max.
Example:
generation:
recursionDepth: 15
listLimits:
minLength: 1
maxLength: 5
floatLimits:
min: -100.0
max: 100.0
Redis Configuration
When set, Verifier writes structured logs, test results, and a
done message to a Redis pub/sub channel during the run.
redis: Optional Redis configuration:hostname: Required IP or hostname of the Redis serverport: Required Port for Redis pub/subpassword: Required Authentication passwordtopic: Required Channel name. Every message on this channel carries alogtypekey:log,result, ordone.
Example:
redis:
hostname: localhost
port: 12000
password: redis
topic: verifier-output
Component Setup
Verifier controls the lifecycle of your component. A component with
restart: true (the default) is started before each attempt
and torn down after it, so every attempt sees a fresh process. A
component with restart: false starts once at the beginning
of an iteration and stays up for that whole iteration.
List commands under commands. At least one is required.
When multiple are listed, each starts in the order given, and each waits
out its own startup_ms before the next begins.
Direct Binary
A binary Verifier launches and manages directly with signals.
command: Required The full command line including arguments, as a single string. Use the full path to the binary.startup_ms: Required Milliseconds to wait after starting the process before beginning the test. If the component sends a message before this time elapses, Verifier treats it as ready immediately.shutdown_ms: Optional (Defaults to0) Milliseconds to wait after sendingSIGINTbefore starting the process again.capture_stdout: Optional (Defaults totrue) Collect stdout and log it when the process exits.capture_stderr: Optional (Defaults totrue) Collect stderr and log it when the process exits.restart: Optional (Defaults totrue) When true, start and stop the process around each attempt. When false, start once per iteration and keep it up for that iteration.
Example:
commands:
- command: /usr/local/bin/sensor --listen 6668 --report 6667
startup_ms: 500
shutdown_ms: 200
Docker Container
A Docker container Verifier runs and stops.
image: Required Docker image name (e.g.,sensor:latest)startup_ms: Required Milliseconds to wait after starting the container before beginning the test.container_name: Optional Name to give the container.ports: Optional Port mappings in Docker format (e.g.,["8080:80", "443:443"])environment: Optional Environment variables inKEY=VALUEformat (e.g.,["DEBUG=1", "PORT=8080"])volumes: Optional Volume mounts in Docker format (e.g.,["/host/path:/container/path"])host_network: Optional (Defaults tofalse) Use host network mode.shutdown_ms: Optional (Defaults to0) Milliseconds to wait after stopping the container before starting it again.capture_stdout: Optional (Defaults totrue)capture_stderr: Optional (Defaults totrue)restart: Optional (Defaults totrue)
Example:
commands:
- image: sensor:latest
container_name: sensor-test
ports:
- "6668:6668"
startup_ms: 1000
Kubernetes Pod
A pod already running in a cluster. Verifier cycles the pod to control component lifetime.
k8s_namespace: Required Namespace the pod lives in.k8s_name: Required The pod must have anapplabel with this value.startup_ms: Required Milliseconds to wait after restarting the pod before beginning the test.shutdown_ms: Optional (Defaults to0) Milliseconds to wait after deleting the pod before recreating it.restart: Optional (Defaults totrue)
Example:
commands:
- k8s_namespace: default
k8s_name: sensor
startup_ms: 2000
External Command
A component whose lifetime is managed outside Verifier. Verifier signals it by running short commands and watches a file to learn when the component exits on its own.
commandStart: Required Command to signal the component to start.commandKill: Required Command to signal the component to stop.commandWatch: Required Path to a file Verifier watches withinotify. Any modification is treated as the component having exited.startup_ms: Required Milliseconds to wait after runningcommandStartbefore beginning the test.shutdown_ms: Optional (Defaults to0) Milliseconds to wait after runningcommandKillbefore runningcommandStartagain.restart: Optional (Defaults totrue)
Example:
commands:
- commandStart: /bin/bash -c 'echo start > /tmp/startfile'
commandKill: /bin/bash -c 'echo kill > /tmp/killfile'
commandWatch: /tmp/watchfile
startup_ms: 1000
shutdown_ms: 5000
Transport configuration is in verifier docs open transports.