Testing Location-Based Apps: Simulating GPS Routes for QA

How QA teams can test geofences, tracking and navigation on real iPhones and Android phones by playing back simulated GPS routes from a desktop.

By Geovoya team · · Updated

Location features are among the hardest to test well. The bugs show up in motion: a geofence that fires twice, a delivery ETA that jumps backwards, a tracking screen that freezes when the app goes to the background. You can’t find them by sitting at your desk with the phone’s real GPS, and a tester driving around town is slow, expensive and impossible to repeat exactly.

Simulated routes fix that. This article covers where simulation fits in a test strategy, which scenarios to cover, and how to play back routes on real devices with a desktop tool like Geovoya.

Simulators, emulators and real devices

Each layer catches different problems:

  • Unit tests with fake location providers check your logic (distance maths, geofence decisions, ETA smoothing) quickly and without flakiness. They can’t tell you how the operating system behaves.
  • The iOS Simulator and Android Emulator can replay locations too. Xcode accepts GPX files, and the Android Emulator’s extended controls can play back routes. They’re good for fast iteration, but they don’t fully reproduce real-device power management, background limits, permission prompts or vendor-specific Android changes.
  • Real devices with simulated location sit in between. The OS, the permission model and the battery optimisations are real, but the position is under your control. This is where many “works on my machine” location bugs finally show up.

A sensible approach is to cover logic in unit tests, iterate in the simulator or emulator, and run a smaller, well-chosen set of route scenarios on real phones before release.

Scenarios worth scripting

Write these as repeatable test cases with a fixed route, so you can compare runs:

  1. Geofence entry and exit. Plan a route that starts outside a region, passes through it and leaves. Check that each event fires once, with the right timing, in the foreground and the background.
  2. Arrival detection. Routes end by holding the destination. Check that “arrived” fires, and doesn’t keep firing while the position stays still.
  3. Background tracking. Start the route, send the app to the background, lock the phone and bring the app back a few minutes later. Look for gaps, bunched-up points or a stale map.
  4. Pause and resume. Pausing a route holds the last point, like a vehicle stuck in traffic. Check that your app doesn’t count the stop as movement and that the ETA recovers.
  5. Signal loss. Unplug the cable or let the Wi-Fi connection drop in the middle of a route. Your app should handle the gap without crashing or drawing a straight line across the map.
  6. Permissions. Repeat a short route with “While using”, “Always” and, on iOS, precise location turned off. On Android, try approximate location as well.
  7. Region-specific behaviour. Set fixed locations in different countries to check the currency, the units, content availability and time-zone labels. Remember that simulating GPS doesn’t change the phone’s time zone, SIM or IP address, which many services also use.

Playing back a route on a real device

Geovoya plans routes on real roads rather than drawing straight lines between waypoints, which makes the movement realistic for vehicle-style apps:

  1. Connect the test phone (iPhone on iOS 17.4+ or Android 8+) and prepare it. See the setup guide.
  2. Choose Route and add stops in travel order: a start and a destination on the free plan, or up to 12 stops with loops and pauses on Geovoya Pro. With Pro you can also import a recorded GPX or KML track instead. Use search, coordinates or map pins. Keep a list of the exact coordinates in your test plan so everyone runs the same route.
  3. Click Plan road route. The route comes from an OSRM service using OpenStreetMap roads. Pins snap to a road within 1 km. If the stops can’t be joined by road, planning fails instead of drawing a straight line, which is safer for tests.
  4. Check the distance, then click Start route. The phone jumps to the first road point and moves along the route.

Know the playback model

Knowing exactly how playback works helps you read the results:

  • Speed. On the free plan, playback runs at a constant 45 mph (20.1168 m/s), whatever the speed limits or traffic; at one update per second, positions are about 20 m apart. Pro lets you pick any speed from 1 to 120 mph and change it mid-route.
  • Realistic movement (Pro). Optional gradual acceleration, slowing before turns, occasional stops at sharp turns and bounded GPS drift. Turn it off when you need perfectly repeatable runs.
  • One-second cadence. A new target is sent every second, even with the window minimized. On Android, the helper also repeats the fixed position every two seconds when idle.
  • No catch-up jumps. If a command is slow, or the computer sleeps or disconnects, the route pauses rather than skipping ahead. After reconnecting, the same phone holds the last point until you press Resume. This keeps runs predictable, but note any pause in your test log.
  • Nothing resumes after a restart. The route is kept in memory, so restarting the app doesn’t continue it. Plan the route again.
  • Acknowledged isn’t the same as consumed. The status panel shows iPhone command acknowledgements or Android helper readbacks. It can’t see what your app received. Log positions inside your app and compare them with the route.

Tips for reliable runs

  • Keep the computer awake and plugged in during long routes. Sleep pauses playback.
  • Plan for several devices. The free plan simulates one phone at a time. Pro runs up to three phones at once, each with its own route, so you can compare iPhone and Android side by side.
  • Restore between tests. Click Restore real location before editing a route or switching phones, and give apps a moment to drop cached positions.
  • Watch for mock detection. Android lets apps check whether a fix came from a mock provider. If your own app does this (for example, for fraud prevention), you’ll need a test build or configuration that allows mock locations.
  • Mind the public services. The free app uses public demo servers for search and routing, which are rate-limited and have no uptime guarantee. Plan routes ahead of time, save them to the route library and don’t script bulk requests against them. Hosted routing is on the roadmap.
  • Record evidence. Screen-record the phone together with Geovoya’s status panel. Bug reports with the route, timestamps and the app’s own logs are much faster to fix.

Wrapping up

Simulated routes on real hardware make location testing repeatable. Pair them with unit tests for your logic and emulator runs for quick iteration, and keep a small library of standard routes that every release has to pass.

When you use simulation outside your own test apps, remember that other services may not allow it. Respect their terms.

Put your phone anywhere in minutes

Download Geovoya for Windows or macOS, connect your phone and set your first location. Free to start, Pro when you need more.