How to test my application for GPS location without travelling in real-time?

Problem behind my query :

I am in need to test a travel-based application where your location will change according to the traveller's direction, now I need to test my geo location-based app while on the drive (a car/some vehicle)

Question As location dynamically changes on the move, is it there any way to test the application for testing/simulate without travelling in a real-time?


6 Answers 6


• For Android

Lockito application should work for you.

It allows to emulate movement from one location to another one.
You can set the speed, the route is based on Google Maps.

• For iOS

There are at least 2 approaches:

  • use Xcode with GPX files
    Here's good article on this. Also there is a script to generate GPX files with routes.

  • or add location spoofing to your test scripts
    Find information and code example here. Using this you can set moving speed as well.

  • 3
    You really need to give more information - how does this software help the OP test their software's geolocation function without having to travel?
    – Kate Paulk
    Jun 5, 2014 at 10:07
  • 1
    Welcome to SQA, Dmitry! I'd like to give you a chance to elaborate on this. As it stands, it's impossible to make the connection of why it's a good tool based on just what is in the answer. If you could flesh out your thoughts here, that'd be great! =)
    – corsiKa
    Jun 5, 2014 at 14:07
  • 2
    Good improvement, that's a much better answer. Thanks Dmitry!
    – testerab
    Jun 7, 2014 at 6:54

You could to create a Test-specific build which stubs the input GPS data. By having a data-input interface (in code) you could have fake GPS information fed in - I'm not sure what the data is or how it will look, but whoever developed the application should be able to engineer this.

While this is going to be a build which is never to be released to production it will allow you to gain some confidence in the gps coordinate functionality quickly and easily, without leaving your seat.

Occasionally - at least once - during an Integration stage the actual GPS-mapping (non-stubbed) will also require actual testing.


We'll need more information to have a better answer.

In the meanwhile here are some options-

  1. Buy a GPS simulator. It costs a few 10K's$ but will solve your problems since it generates "real" GPS signal. As a bonus it will also test your GPS receiver, and your application with non-ideal GPS conditions.

  2. Feed the application faked coordinated (see kiwimatt reply). for example by injecting NMEA messages or other messages at the driver level (GPS chip -> HW interface -> SW interface -> driver ->[insert messages here]-> application).

You can generate coordinates along a route by taking a GPS receiver to a drive (there are cheap USB GPS dongles you can plug to a laptop, or cheap standalone receivers communicating by Bluetooth).


This sounds like the perfect scenario for a test stub. You should look into what actual data the application will process (NMEA stream, real time GPS feed, KML file etc). Once you understand the model, you will need to record or generate a test file that matches what you want to test, and then inject it into the application via the test stub.


While testing location based app I used to travel to get exact results. But I used another way also by using the other Android apps that gives Fake GPS locations. By using fake GPS locations you can test your app.

  • fake location apps will just help u to simulate current location ,but i need to test for start and end points without travelling in real time,for e.g let me say i am travelling a distance of 450kms,my application would automatically changes location based on ur move,how to test this scenario without travelling is my question Jan 3, 2014 at 6:59

Use the link below to generate a GPX files and then load it into Xcode as described in the other answers GPX creator

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.