Package-level declarations

Types

Link copied to clipboard
class AsyncGate

A one-shot signal that resumes every waiter when opened.

Link copied to clipboard
class AutomationId(val namespace: String)

Builds stable, cross-platform UI automation identifiers such as myapp.home.feed.video_card.intro%20clip.

Link copied to clipboard

Records values, such as arguments passed to a faked dependency, in the order calls arrive.

Link copied to clipboard
class FixtureDirectory(val root: File)

Reads fixtures beneath one explicit root, rejecting paths that escape it.

Link copied to clipboard
data class FlowObservation<T>(val values: List<T>, val end: FlowObservation.End)

Events collected by observeFlow and the reason it stopped.

Link copied to clipboard
data class Frame(val left: Float, val top: Float, val right: Float, val bottom: Float)

An axis-aligned rectangle in one coordinate space, such as pixels in a window.

Link copied to clipboard

Layout checks over Frames in one coordinate space.

Link copied to clipboard
class ManualClock(val start: Instant = Instant.fromEpochMilliseconds(0)) : Clock, TimeSource.WithComparableMarks

A clock whose time moves only when a test calls advanceBy or advanceTo.

Link copied to clipboard
class ObservationTimeout(val lastObservation: Any?) : Exception

A condition did not match before its deadline.

Link copied to clipboard

The horizontal order in which a row of content is read.

Link copied to clipboard

Reading-order checks from frame geometry alone, shared by Compose tests, instrumentation tests, and device drivers.

Link copied to clipboard
class ScriptedResponder<Request, Response>(outcomes: List<Result<Response>>, fallback: Result<Response>? = null)

A scripted fake that records each request and answers it with the next scripted outcome.

Link copied to clipboard
class ScriptedValues<T>(values: List<T>, exhaustion: ScriptedValues.Exhaustion<T> = Exhaustion.Fail)

A deterministic sequence of values, such as dates or IDs, with an explicit exhaustion policy.

Link copied to clipboard

Finds an existing snapshot reference directory for a test class without choosing a snapshot library or recording policy.

Link copied to clipboard
class TemporaryDirectory(prefix: String? = null, parent: File = File(checkNotNull(System.getProperty("java.io.tmpdir")) { "java.io.tmpdir is not set" })) : AutoCloseable

An independently owned scratch directory with a unique name, so parallel tests never share state.

Link copied to clipboard

A payload-free error for exercising failure paths without a domain dependency.

Functions

Link copied to clipboard
fun fixtureEnvironment(base: Map<String, String> = emptyMap(), overrides: Map<String, String?>): Map<String, String>

Builds an isolated environment map for injection or a child process.

Link copied to clipboard
suspend fun <T> observeFlow(flow: Flow<T>, maxCount: Int, timeout: Duration, until: (T) -> Boolean = { false }): FlowObservation<T>

Collects flow with both an event budget and a real-time budget.

Link copied to clipboard
inline fun <T, E> roundTrip(value: T, encode: (T) -> E, decode: (E) -> T): T

Encodes and decodes value with the caller's serialization policy.

Link copied to clipboard
suspend fun <T> waitUntil(timeout: Duration, pollInterval: Duration = 10.milliseconds, observe: suspend () -> T, matching: (T) -> Boolean): T

Observes state until it matches matching, polling every pollInterval.