testing.TestRegistry

class in the testing package.

Reference version

Signature

class testing.TestRegistry

Source:<builtin>/testing/registry.bamlbytes 481612074

Fields

expansions

map<string, testing.TestRegistry>

loading_time_ms

int

Static methods

Instance methods

function

expand_set

(self, name: string) -> testing.SerializedTestDef[] throws unknown

Expand a lazy testset by name. Searches recursively through expanded sub-registries so nested testsets can be expanded too.

function

list_filtered

(
self,
profile_include: string[],
profile_exclude: string[],
cli_include: string[],
cli_exclude: string[]
) -> string[] throws testing.InvalidTestName

CLI --list support: the selected leaf names, without running anything.

function

run_filtered

(
self,
profile_include: string[],
profile_exclude: string[],
cli_include: string[],
cli_exclude: string[],
max_concurrency: int

CLI entry point: glob-filter in BAML, run (honoring testset runners), and flatten into a tolerated-aware flat report the Rust driver prints directly.

  • no filters -> run_all (whole tree)
  • any filter -> glob the leaf names, then run_selected (parent runners still apply to the selected subset)
function

run_test

(self, name: string) -> testing.TestReport throws string

Find test by name in root collector, then recurse into expanded sub-registries.

function

serialize

(self) -> testing.SerializedTestDef[]

Serialize registry to pure-data list for the UI. Checks expansions map to determine lazy vs expanded for each testset.

Tests are serialized before testsets by design — tests are leaf items, testsets are containers.