Files
android-client/tests.md
Zoltan Pappandhchengting 10a35f9215 Handle network changes without restarting the engine (#237)
Network changes no longer restart the engine; they are handled as events.

No network: the reconnect loops suspend instead of retrying against an unreachable network, and the UI and the notification show "No network available". The loops resume with a fresh backoff when connectivity returns.
Network switch: stale management, signal and relay connections are swept and re-dialed immediately on the new network (cross-transport handover fast path: fix: notify Go core on seamless network handover (cellular → WiFi) while VPN is active #243).
WiFi-to-WiFi handovers are detected by network identity, so a same-transport switch triggers the same reconnect path.
Availability is seeded from non-VPN internet networks, so an up tunnel cannot mask a missing underlying network.
New instrumented e2e suites (NetworkTransitionTest, ExitNodeNetworkTransitionTest) cover blackout, transport-switch and handover scenarios with outage budgets.
---------

Co-authored-by: hchengting <74168694+hchengting@users.noreply.github.com>
2026-08-25 20:24:31 +02:00

1.7 KiB

Instrumented tests

On-device e2e tests for the Android client, run on an emulator or a real device. The test group is selected with the instrumentation runner's class argument. The optional FailFast listener (listener=io.netbird.client.e2e.FailFast) skips everything after the first failure.

Groups (suite classes)

class value What it runs
io.netbird.client.e2e.E2eSuite The full suite, in order: auth, peer connectivity, ACL, DNS, exit node, network transitions. Turns force relay OFF once at start.
io.netbird.client.e2e.NetworkTransitionSuite Only the network transition scenarios (exit-node variant + the transition matrix). The member tests turn force relay ON themselves.

Any single test class below also works as a class value.

Test classes

Class What it verifies
SetupKeyAuthTest Login through the profile editor UI.
PeerConnectivityTest Ping to a live peer over the tunnel, with and without relay support.
PortAclTest ACL enforcement: TCP 80 reachable, ICMP blocked on the same peer.
DnsResolutionTest Tunnel DNS: peer FQDN and search-domain name resolve to the private IP.
ExitNodeRouteTest Public egress goes through the exit node.
ExitNodeNetworkTransitionTest Exit-node egress re-establishes after WiFi loss and a full blackout, within tight time budgets.
NetworkTransitionTest Network transition scenarios (airplane mode on/off from WiFi/cellular/both, transport switches, handover); recovery must complete within tight time budgets.

Not part of any suite: NetworkConnectivityStressTest (manual, random disruption stress cycles) and the ExampleInstrumentedTest scaffolding.