# Regression tests Run `python tests/run.py` from the repository. Requires JDK 17, Python 3, Node.js, Bash and an Android API jar. Set `ANDROID_SDK_ROOT` (default `D:/Android/Sdk`), `ANDROID_JAR`, or `TEST_BASH` to override locations. JSON 20240303 and KXML 2.3.0 test dependencies are downloaded from Maven Central with pinned SHA-256 checksums, into the ignored `build/tests/` directory. Production classes are compiled directly: ProviderController, ConfigSnapshot, SpoofState, RootShell, MirrorCommand, LegacyPrefsMigration and Geocoder (route planning only, with `Geocoder.fetcher` replaced by canned AMap v3/v4/v5 responses in `RouteTest`: alternatives, fallbacks, multi-leg combination, de-duplication and the cap of three routes). The `stubs/` directory replaces only external platform/framework IO. RootShell uses a host Bash subprocess rather than real su. Migration injects root command output; XML parsing and migration control flow are real. MirrorCommand runs against host temporary files with chown/chcon substituted; tests verify exit propagation, preserving the previous snapshot, temporary-file cleanup, UTF-8/quoting and stale-command rejection. Diagnostic decisions execute the actual JavaScript function. These tests do not execute Android system_server, Xposed hook installation, SELinux policy, or WeChat/DingTalk. A successful run establishes host-level behavior, not device compatibility. No test phones were connected for 1.3.3. For 1.3.4, `tests/location/` compiles the production RealLocationRequest against isolated Android IO stubs, separate from the other tests. It covers 20 consecutive fixes, 10 consecutive timeouts followed by recovery, distinct provider listeners, partial registration/cleanup failures, busy requests, cancellation, destruction, stale callbacks, permissions, disabled providers and cache/mock filtering. `location-bridge.cjs` executes the actual JavaScript bridge/UI code with deterministic timers to verify single-flight requests, timeout cleanup, late callbacks, bridge errors and button recovery. Set `TEST_NODE` to use a specific Node executable. Host assertions do not establish Android Binder/ROM behavior. Physical-device regression checklist: upgrade/reboot; stop spoofing and repeat real-location requests at least 20 times without killing the app; repeat while address lookup/network is slow; switch location off and back on; deny and restore permissions; force timeouts then retry; leave/reopen the page while locating; verify start/stop spoofing still works. For the Android 15/16 WiFi-scan fix: with spoofing on, confirm `getScanResults` returns empty to non-exempt apps (so Amap/Tencent/Baidu and UnionPay cannot reverse the real position). Also retain the previous checklist: old-hook mismatch, Root denial then grant, single-provider failure, network toggle, repeated quick start/stop, background service loss, exemption changes, scoped apps, clones/work profiles. Keep OS/framework/app versions with each result. The Android-9 device (Huawei Mate 9) was used only to confirm the build launches and does not regress; the WiFi `ParceledListSlice` path exists only on Android 15/16 and was verified against AOSP source, not on a physical Android 15/16 device.