Location scenarios: demonstration
This demonstration shows what is provided by the scenario widget, which can be used to develop and test location-dependent behavior of mobile apps, as part of the MobileFirst mobile tools suite.
Clicking the scenario widget presents a scenario template. We can create, import, load, export, edit scenarios, and play or restart scenarios.
Figure 1.
![]()
- To name the scenario, enter a name in the Name field.
- To edit the scenario, click Edit.
We provide the longitude and latitude for the location, which is based on the behavior of the application to test. To test geofences, enter a location close to their boundary. For example, if the application defines a geofence around a store, you could provide the location of that store.
Figure 2 shows a map displaying an area of roads and buildings and also includes the location of a shopping mall. The template supplies the Longitude, Latitude field which must be completed.
Figure 2.
![]()
Provide the location for the user's device to be set up and tested in the Longitude, Latitude field. This is where the movement of the device will be simulated. After entering the longitude and latitude click Go to move the map to that location.
The template also shows the various buttons and tools used for navigating, and for creating paths and zones in the scenario.
- To move around the map click the directional arrows or click and drag the map.
- To zoom in or out use the +/- track below the directional arrows, or use the scroll wheel.
- These buttons are provided for use, as necessary.
- Click Go to move the map to the specified location.
- Click Cancel to cancel all changes made to the scenario and close the editor.
- Click Apply to apply the changes to the scenario and close the editor.
The three icon buttons are used to define the scenario by creating paths and zones.
- The first button is used to create a simulated path for the mobile subscriber. For example, you could simulate defining a route along a road, then turning into a parking lot, and then entering the shopping mall.
- Click this button to define a path. Click the map to add vertices (points) to the path. Double-clicking adds the final point to the path.
- Click a vertex to change the time at which the simulated subscriber will pass that vertex. The first vertex is fixed at time 0. When we click on a vertex, a Delete Path button is also visible, which deletes the entire path if clicked.
- Click on the path between vertices to show two blue circles. The circle on the path can be clicked and dragged to move the path. The circle to the lower right of the path can be clicked and dragged to resize or rotate the path.
- Only a single path can be defined at one time. Beginning a new path deletes the previously defined path.
When we play the scenario, the geolocation widget automatically updates the location, the heading and the calculated speed, based on the simulated user's position along the path.
- The second button can be used to define WiFi access points and their coverage zones.
- After we have clicked the button, clicking on the map defines a new access point. Click on the map where the center of the coverage zone for the WiFi access point should be, and drag to set the size you want. The coverage zone is displayed. The gray outer circle corresponds to a signal strength of 15%, which is the default signal strength threshold for the WiFi acquisition policy. The yellow inner circle corresponds to a 50% signal strength, which is the medium confidence level. The innermost orange circle indicates 80% signal strength, which is the high confidence level.
- Click on the WiFi zone to edit the properties for the access point. We can set the SSID and MAC, or we can click Delete to delete the access point.
- After clicking on a WiFi zone we can also see two blue circles. Clicking the circle in the center of the zone and dragging it can be used to move the WiFi zone. The circle to the lower left of the zone can be clicked and dragged to resize the WiFi zone.
- It is possible to define multiple WiFi zones.
When we play the scenario, the network widget automatically updates the visible access points, including their simulated signal strengths, based on the simulated device position. WiFi zones are not used to simulate the geolocation of the device.
- The third button is used to define no-GPS coverage zones.
- Click this button to define no-GPS coverage zones. Click the map to add vertices (points) to define the boundary of the zone. Double-clicking adds the final point to the zone.
- Click a no-GPS zone to move it, or delete it by clicking Delete. After you click a no-GPS zone, two blue circles appear. The blue circle at the center of the no-GPS zone can be clicked and dragged to move the no-GPS zone. The circle to the lower right of the zone can be clicked and dragged to resize and rotate the no-GPS zone.
- It is possible to define multiple no-GPS zones.
When we play the scenario, the geolocation does not change from its previous value while the simulated user's position is inside a no-GPS zone. This behavior can be seen in the geolocation widget, which does not update while the simulated user moves through a no-GPS zone.
Figure 3 shows the Access Point that requires data to be entered in the fields.
Figure 3.
![]()
When we click the WiFi zone, the Access Point presents the SSID and MAC fields, so we can enter the relevant data. Here we can use the name of a restaurant or store, for example. A Delete button is provided to delete the WiFi zone. Two blue circles, or handles, are also visible. These can be used to move or resize the WiFi zone. In figure 4, the WiFi Zone is moved and enlarged. A no-GPS zone has been defined, see the gray polygon.
Figure 4.
![]()
If we click the path, it produces a Route Point dialog, used to enter how much time it takes the simulated user to reach various points along the route. The first Route Point is set at 0, which cannot be edited.
![]()
The second Route Point can be set as 11, for example
![]()
The third Route Point can be set as 17, for example
![]()
We can change the times, but each value must be increasing from the last. When we play the simulation, the simulated user is at point 1 at time 0, at point 2 at time 11, at point 3 at time 17.
When the scenario is completed, click Apply and then Play to play the scenario; see Figure 5.
Figure 5.
![]()
On the screen you see the user moving along the path, and the information that you receive can be used to interact with the application that is being tested. As the user enters various areas, if a geofence or WiFi trigger is set up then you see that the user's device would register the geofences or WiFi fences.
Click Export to save the scenario to disk. We can reload it by clicking Import, selecting the file where it was previously saved, and clicking Play. After clicking Play, the button changes to Pause, and can be clicked to pause the scenario. Clicking Restart plays the scenario from the beginning.
Parent topic: Location scenarios