Skip to content
Proctor
Esc
↑↓navigate↵open⌘Jpreview
On this page

Getting started

Add Proctor, define a suite, run it and build a report.

Add the dependencies

The core has no dependency on any model SDK. Add it to commonMain, and add the adapter for each platform you test on.

kotlin {
    sourceSets {
        commonMain.dependencies { implementation("io.github.jantursky:proctor:1.0.0") }
        androidMain.dependencies { implementation("io.github.jantursky:proctor-mlkit:1.0.0") }
        iosMain.dependencies { implementation("io.github.jantursky:proctor-ios:1.0.0") }
    }
}

Add the Gradle plugin to the module that builds reports:

plugins {
    id("io.github.jantursky.proctor") version "1.0.0"
}

Define a suite

Put suites in commonMain so both platforms run the same one. See Writing suites.

Run it

On Android the suite runs from an instrumented test on a physical device, see Running on Android. On iOS it runs through a small Swift bridge, see Running on iOS.

For a first try without a device, use the fake backend:

val backend = FakeBackend { prompt, _ -> "Billing" }
val results = EvalRunner(backend, RunnerConfig(requestDelay = Duration.ZERO)).runAll(suite)

Build the report

Copy the result files into proctor-results/ and run:

./gradlew proctorReport

The report lands in build/reports/proctor/ as index.html and report.md. See Reading reports.

Was this page helpful?