For testing real location in a more controlled/automated way, this might be easier when testing small scale (and higher accuracy) “indoor” location applications/deployments. This of course is a very niche area and require special network/hardware deployment for the application to detect bluetooth beacons via Bluetooth Low Energy (BLE) technology. If you were testing this type of application, you could rig up a hardware test setup that moves in a fixed or random path and test against that path movement. For example:
- a toy train railroad track, with mobile device attached to the train for it to move along the track
- a conveyor belt setup, with mobile device moving along conveyor belt (if not in a loop, then back & forth along the conveyor belt)
- attaching the mobile device to a Roomba or equivalent robot vacuum device, etc. to move about a room, etc.
In all these example setups, the BLE beacon hardware is placed along various points of the path the device will travel through, so that the application under test can detect and figure out it’s estimated location. You however would need to figure out how to validate the application’s estimated location vs the actual location of the device at given points in time, to determine the accuracy and functionality of the application.
For an example application for indoor locations, see https://play.google.com/store/apps/details?id=com.mist.mist_experience.
For the larger scale, less accuracy outdoor location version, to have a controlled/automated test equivalent, you’d probably need something like the self driving car setup, programmed for some fixed route, if not using random route testing, and run your test automation against a mobile device in the car. If not self driving car, can drive the car manually or walk/bike with the mobile device tagging along for the route/movement, you can then run test automation against that if not doing the testing manually.
The larger scale outdoor location testing, could also be tested indoors (or outdoors) if you have a decently sized test setup for something like a railroad track or conveyor belt, but it would need to be pretty big/long to test a decent GPS location route, like probably a quarter mile or 800 ft, etc.
FYI, I mention less accuracy for GPS outdoor location, in the sense that with outdoor location covering a wider scale, being several meters off in actual location, you won’t really notice any difference for where you are on the map or road/street, it’s “close enough”, and easy for the application to account for. With indoor location, being a meter or more off, you really see the difference on the map/screen, so it gets harder to fudge/patch the inaccuracies for a smoother look as you move around the map.