ClientUtils.RunLink (client_utils v0.3.1)

View Source

A test run's link to the CodeMySpec harness that started it.

The harness names itself in the run's environment: CMS_HARNESS_NODE, CMS_HARNESS_COOKIE and CMS_RUN_ID, and optionally CMS_RUN_LISTENER, the process to report to (by default the harness's CmsHarness.RunLink). The run joins that node and sends each event as it happens to that process. It halts when the harness process that owns it goes away, so a run never outlives its harness. A run started with none of these runs as a plain mix test.

Summary

Functions

Join the harness named in the environment, or nil when none is named. A harness that is named but cannot be reached halts the run before any test.

Send one event to the harness. A run without a link sends nothing.

Types

t()

@type t() :: %ClientUtils.RunLink{
  harness: node(),
  listener: atom(),
  run_id: integer()
}

Functions

join()

@spec join() :: t() | nil

Join the harness named in the environment, or nil when none is named. A harness that is named but cannot be reached halts the run before any test.

report(arg1, event)

@spec report(t() | nil, map()) :: :ok

Send one event to the harness. A run without a link sends nothing.