Reproducible tests
Basic Go compilation and tests do not need an Android SDK, Java, Node or Python:
go test ./...
go vet ./...
go test -race ./...
Use a real Go compiler. The recorded /workspace/tooling/go/bin path may not exist on your host. Check go version; /usr/bin/go in this workspace is a game.
JavaScript client: node --test packages/javascript/core.test.cjs.
JNI: make native-test checks reference/thread ownership with a controlled JNI table. It does not replace real Android execution.
On this page
Optional external comparison
These tools only validate the artifact already generated by Go. They are not shipped in the delivery or invoked by koru build.
export KORU_TEST_DEXDUMP=/path/to/dexdump
export KORU_TEST_AAPT=/path/to/aapt
export KORU_TEST_JAVA=/path/to/java
export KORU_TEST_APKSIGNER_JAR=/path/to/apksigner.jar
go test -tags android_external -v ./tests/external
Resolve shared libraries for dexdump/aapt when the official prebuilt requires them.
Android execution
Install a debug APK with the six built-in plugins and the native.info example configured as described in the plugin guide. The android-smoke.py sample uses appId com.example.koru; its webDir contains examples/web plus tests/fixtures/sw.js copied as sw.js. The worker must answer /sw-probe with koru-worker-offline and claim its clients. The delivery's koru-demo.apk is release and does not expose DevTools.
export KORU_TEST_ADB=/path/to/adb
"$KORU_TEST_ADB" install -r app-debug.apk
"$KORU_TEST_ADB" shell svc wifi disable
"$KORU_TEST_ADB" shell svc data disable
"$KORU_TEST_ADB" shell am start -W -n com.example.koru/com.koru.runtime.MainActivity
pid=$("$KORU_TEST_ADB" shell pidof com.example.koru | tr -d '\r')
"$KORU_TEST_ADB" forward tcp:9223 "localabstract:webview_devtools_remote_$pid"
python3 tests/android-smoke.py
python3 tests/android-navigation.py
python3 tests/android-worker.py
python3 tests/android-keyboard.py
python3 tests/android-share.py
These QA scripts require Python websockets. Default port: 9223; smoke accepts --port and --output. Run sequentially and reopen index.html before smoke if you used the counter. Force-stop/restart between smoke and navigation checks storage persistence.
Keyboard/navigation tests use the reference emulator's 720×1280 screen, density 320 and 24dp status bar. Adapt coordinates for other screens. No test controls unrelated apps or sends chooser content to a recipient.
Recorded matrix and results. API 30 execution does not test the notification permission dialog introduced in API 33.
Formatting before commit
gofmt -w cmd internal pkg plugins runtime/dex examples/dex tests/external
black tests/*.py
clang-format -i runtime/native/koru_plugin.c runtime/native/koru_plugin.h runtime/native/scope_test.c
JS/HTML/CSS/JSON files were formatted with Prettier 3.6.2. AOSP JNI headers retain their original format and license. Formatters are development tools, not koru runtime requirements.
Website checks are independent: see website/README.md.