plushie/testing/backend/headless

Headless test backend using the Rust renderer with software rendering.

Spawns plushie --headless as a Port and communicates via the negotiated wire format (msgpack by default, json opt-in). Provides structural tree snapshots and real widget rendering for regression testing. No display server required.

Limitations

Types

Options for the headless backend.

pub type HeadlessOpts {
  HeadlessOpts(
    format: protocol.Format,
    renderer_path: option.Option(String),
  )
}

Constructors

  • HeadlessOpts(
      format: protocol.Format,
      renderer_path: option.Option(String),
    )

    Arguments

    format

    Wire format. Default: Msgpack.

    renderer_path

    Path to the plushie binary. None = auto-resolve.

Values

pub fn backend() -> backend.TestBackend(model)

Create a headless test backend with default options.

pub fn backend_with_opts(
  opts: HeadlessOpts,
) -> backend.TestBackend(model)

Create a headless test backend with custom options.

pub fn default_opts() -> HeadlessOpts

Default headless options.

Search Document