Geo-fence testing using set location and notification features
Geo-fencing is a technology you can test using the Set Location and Notification open features. We have uploaded a sample project that shows the test strategy to follow, including the server configuration and how to test the client feature scenarios.
To test geo-fencing, you create user profiles per dwelling time in geo-fence ranges/area. This requires:
- A Virtual area in a real geographical location
- Push notifications when the user enters and exits the geo-fence area
- An application installed and enabled with GPS, Wi-Fi, and cellular data interfaces
Step-by-step Instructions
The following procedure describes how to test geo-fencing using the Set Location and notification open features.
-
Go through the slides in the following PDF file, which includes these sections:
-
Geo-Fencing Overview
-
Geo-Fencing Architecture and notification
-
Testing Strategy for testing Geo-Fencing notification by using Set Location
-
Adv/Disadvantages of Geo-Fencing
-
Vitals of Geo-Fencing
-
Reference links for Developing Geo-Fencing enabled Application for Android, iOS, Windows.
-
-
Watch the following video. It illustrates a sample automation test scenario.
-
The user launches a geo-fence enabled app, in this case as an admin user (adding Geo-fence, configuring notifications, dis/enabling Bluetooth / WiFi, and so on) and then as a client user (to be able to use Geo-fencing, the user will receive a notification on entering/exiting the Geo-fence area).
-
The user adds Geo-fencing and configures notification alerts to appear when the user enters or exits the Geo-fence area.
-
The user uses the Set Location feature to mock a location. The user appears to be entering or exiting a specific geo-fence area.
-
When the user enters the area, the user receives a notification and confirms/validate the entry.
-
When the user exits the area, the user receives a notification and confirms/validates the exit.
-
The user deletes the geo-fence area created earlier.
-
-
Work with the Geo-Fencing sample test project, as follows:
- Clone or download projects from here: https://github.com/PerfectoCode/Community-Samples
- Import the project PerfectoGeoFencingDemo into the Eclipse IDE.
- Open Perfecto device.
- From the Google Play store, install the app GeoAlert. You will use this app with our geo-fence demo automation code.
- Open file the following file:
PerfectoGeoFencingDemo/src/com/perfecto/demo/GeoFencing/
GoeFencingDemo.java
- Update the following information with your own details:
MyHost
is the name of your Perfecto clouduser@perfectomobile.com
is your user's email address.tokenNeedToBeAddedHere
is your Perfecto security token.- The
deviceName
parameter requires the name of the device you are testing.
CopyString host = "MyHost.perfectomobile.com";
capabilities.setCapability("user", "user@perfectomobile.com");
capabilities.setCapability("securityToken", "tokenNeedToBeAddedHere");
capabilities.setCapability("deviceName", "");where: