feat: patrol on-device integration smoke test

This commit is contained in:
randogoth 2026-09-28 23:49:39 +03:00
parent d6f4c434fa
commit 6f6fa20b58
10 changed files with 466 additions and 6 deletions

View file

@ -25,6 +25,25 @@ android {
targetSdk = flutter.targetSdkVersion
versionCode = flutter.versionCode
versionName = flutter.versionName
// The Android Test Orchestrator (with clearPackageData) wipes the
// integration flavor's app data between test runs, and the flavor
// installs it beside — never over — the real app, so every patrol run
// starts at onboarding with a fresh identity.
testInstrumentationRunner = "pl.leancode.patrol.PatrolJUnitRunner"
testInstrumentationRunnerArguments["clearPackageData"] = "true"
}
testOptions {
execution = "ANDROIDX_TEST_ORCHESTRATOR"
}
flavorDimensions += "test"
productFlavors {
create("integration") {
dimension = "test"
applicationIdSuffix = ".integration"
versionNameSuffix = "-integration"
}
}
buildTypes {
@ -38,3 +57,10 @@ android {
flutter {
source = "../.."
}
dependencies {
// The orchestrator referenced by testOptions.execution above. The patrol
// native library itself comes from the patrol pub package's android
// module (a plugin subproject), not from a Maven artifact.
androidTestUtil("androidx.test:orchestrator:1.5.1")
}