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 to 1000) How long Verifier waits for an expected message, in milliseconds, before recording a timeout.
  • test_type: Optional (Defaults to valid) The kind of messages to generate. Values are case-insensitive:
    • valid: messages that satisfy every constraint
    • invalid: messages that violate at least one constraint
    • random: unconstrained random messages. rand is also accepted.
  • iterations: Optional (Defaults to 1) How many times to run the full set of protocols. Each iteration tests every protocol from a fresh start. The key reruns is still accepted on read as a deprecated alias.
  • attempts: Optional (Defaults to 1) How many attempts each protocol gets per iteration. The CLI flag --retries overwrites this value when given; attempts applies 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 init fills 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 to false) 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 run fails without it, and verifier doctor reports 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 to proto_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 to direct) Default serializer for all packages. Values are case-insensitive:
    • direct: raw binary
    • json: JSON
    • protobuf: Protocol Buffers
    • csv: CSV
    • lmcp: LMCP
    • mavlink: MAVLink
    • oms20xml: OMS 2.0 XML
    • ros: ROS
    • stanag4586: STANAG 4586
    • uai: UAI
    • wosa: WOSA
    • xml: 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 default serializer.

Example:

serializer: direct
package_serializers:
  MyPackage::v1: json
  OtherPackage: protobuf

Generation Options

The generation section controls how Verifier generates message content.

  • recursionDepth: Optional (Defaults to 20) 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 to 0) Minimum number of elements
    • maxLength: Optional (Defaults to 10) Maximum number of elements. Must not be less than minLength.
  • floatLimits: Optional Default value range for generated floats:
    • min: Optional (Defaults to -1000000.0) Minimum float value. Set to None for no lower bound.
    • max: Optional (Defaults to 1000000.0) Maximum float value. Set to None for no upper bound. Must not be less than min.

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 server
    • port: Required Port for Redis pub/sub
    • password: Required Authentication password
    • topic: Required Channel name. Every message on this channel carries a logtype key: log, result, or done.

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 to 0) Milliseconds to wait after sending SIGINT before starting the process again.
  • capture_stdout: Optional (Defaults to true) Collect stdout and log it when the process exits.
  • capture_stderr: Optional (Defaults to true) Collect stderr and log it when the process exits.
  • restart: Optional (Defaults to true) 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 in KEY=VALUE format (e.g., ["DEBUG=1", "PORT=8080"])
  • volumes: Optional Volume mounts in Docker format (e.g., ["/host/path:/container/path"])
  • host_network: Optional (Defaults to false) Use host network mode.
  • shutdown_ms: Optional (Defaults to 0) Milliseconds to wait after stopping the container before starting it again.
  • capture_stdout: Optional (Defaults to true)
  • capture_stderr: Optional (Defaults to true)
  • restart: Optional (Defaults to true)

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 an app label with this value.
  • startup_ms: Required Milliseconds to wait after restarting the pod before beginning the test.
  • shutdown_ms: Optional (Defaults to 0) Milliseconds to wait after deleting the pod before recreating it.
  • restart: Optional (Defaults to true)

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 with inotify. Any modification is treated as the component having exited.
  • startup_ms: Required Milliseconds to wait after running commandStart before beginning the test.
  • shutdown_ms: Optional (Defaults to 0) Milliseconds to wait after running commandKill before running commandStart again.
  • restart: Optional (Defaults to true)

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.