ubuntu-location-service  ..
An aggregating location service providing positioning and geocoding capabilities to applications.
/build/location-service-d9SAXf/location-service-3.0.0+16.10.20160912/doc/manual_testing.md
Go to the documentation of this file.
1 # Manual Testplan
2 
3 [TOC]
4 
5 While the automatic test suite of the location service is
6 comprehensive and covers large parts of the functionality of the
7 service itself, we still provide an additional level of acceptance
8 testing covering the entire location stack/experience as a part of
9 this document.
10 
11 ## Dependents/Clients
12 
13  - qtubuntu-sensors
14  - Qt/QML applications:
15  - Browser
16  - osmTouch
17 
18 ## Test Plan
19 
20 This test plan is not supposed to be complete; use it to guide your
21 manual testing so you don't miss big functional areas that are part of
22 the component; also this should be used as guideline to inspire the
23 exploratory testing which should be adapted smartly based on the real
24 content of a MP.
25 
26 Please note that if you're testing the GPS provider, the location
27 service relies on GPS hardware to obtain a location fix. For that, it
28 might be required that you execute the manual steps listed before
29 close to a window or ideally outside, with good satellite visibility
30 conditions.
31 
32 __Note: It can take up to 15 minutes for the GPS device to get a lock, due to lack of assisted GPS__
33 
34  - Install latest image on phone
35  - Install freshly built MPs that are needed for landing
36 
37 Depending on the default configuration of location-service on the
38 image, you may skip parts of this test plan. E.g. if GPS hardware is
39 disabled, skip this part. You can see which providers are enabled by
40 looking at the list of providers on the location-serviced command-line
41 (`ps fauxw | grep location-service`, then look at the `--provider`
42 flags).
43 
44 ### Dummy provider
45 
46 This tests forces location-service to use only the dummy provider;
47 this providers a baseline test for the app to trust-store to
48 location-service path.
49 
50  - phablet-shell into the phone:
51  - `sudo service ubuntu-location-service stop && sudo /usr/bin/ubuntu-location-serviced --bus system --provider dummy::Provider --dummy::Provider::ReferenceLocationLat=48.857503 --dummy::Provider::ReferenceLocationLon=2.295072`
52  - As phablet, start the trust store again (it stops when location-service is stopped) with: `start ubuntu-location-service-trust-stored`
53  - Ensure that all AP tests for the webbrowser pass as expected
54  - Point the browser to maps.google.com (alternatively: here.com, maps.bing.fr).
55  - Request centering the map on current position and observe if it works correctly (should show the Eiffel tower)
56  - Install osmTouch from the app store
57  - Launch osmTouch and check if it centers on the Eiffel tower.
58  - Install a maps webapp such as HERE or Google Maps webapp from the app store
59  - Launch maps webapp and check if it centers on the Eiffel tower.
60 
61 ### GPS Test Plan
62 
63 This applies only if GPS provider is enabled.
64 
65  - (If applicable: Remember to add the silo you are testing)
66  - `sudo apt-get install ubuntu-location-service-tests`
67  - If you want to send off crowdsourced information, i.e., information about visible wifis and visible radio cells for the obtained location fixes to Mozilla's location service and our own instance:
68  - `sudo GLOG_v=40 GLOG_logtostderr=1 GPS_TEST_ENABLE_HARVESTING_DURING_TESTS=1 /usr/bin/uls-tests/gps_provider_test --gtest_filter=*.time_to_first_fix_cold_start_without_supl_benchmark_requires_hardware`
69  - If you '''don't''' want to send off crowdsourced information:
70  - `sudo GLOG_v=40 GLOG_logtostderr=1 /usr/bin/uls-tests/gps_provider_test --gtest_filter=*.time_to_first_fix_cold_start_without_supl_benchmark_requires_hardware`
71 
72  - The test will output a lot of diagnostic information to the
73  terminal and will take ~30 minutes. If satellite visibility is
74  limited, it can take even longer. The test will automatically
75  report success or failure.
76 
77 ### Preliminary AGPS Test Plan
78 
79 **Does not apply to Krillin**
80 
81 Please note that the Krillin GPS chipset driver and its integration
82 within Ubuntu does not support vanilla AGPS (i.e., SUPL) right
83 now. For that, this test case is irrelevant for Krillin and is likely
84 to fail.
85 
86 This applied only if GPS provider and some other provider (giving
87 _A_ssistance) are enabled.
88 
89  - Add the silo.
90  - `sudo apt-get install ubuntu-location-service-tests`
91  - Obtain a (rough) location estimate for your current location on Google maps.
92  - Make sure to replace INSERT_ESTIMATE_HERE with the respective
93  values obtained from Google maps.
94  - If you want to send off crowdsourced information, i.e., information
95  about visible wifis and visible radio cells for the obtained
96  location fixes to Mozilla's location service and our own instance:
97  - `sudo GLOG_v=40 GLOG_logtostderr=1 GPS_TEST_ENABLE_HARVESTING_DURING_TESTS=1 GPS_TEST_REF_LAT=INSERT_ESTIMATE_HERE GPS_TEST_REF_LON=INSERT_ESTIMATE_HERE /usr/bin/uls-tests/gps_provider_test --gtest_filter=*.time_to_first_fix_cold_start_with_supl_benchmark_requires_hardware`
98  - If you '''don't''' want to send off crowdsourced information:
99  - `sudo GLOG_v=40 GLOG_logtostderr=1 GPS_TEST_REF_LAT=INSERT_ESTIMATE_HERE GPS_TEST_REF_LON=INSERT_ESTIMATE_HERE /usr/bin/uls-tests/gps_provider_test --gtest_filter=*.time_to_first_fix_cold_start_with_supl_benchmark_requires_hardware`
100 
101  - The test will output a lot of diagnostic information to the
102  terminal and will take ~10 minutes or less. The test will
103  automatically report success or failure.
104 
105 ### Espoo / HERE provider
106 
107 This applies only if the Espoo / HERE remote provider is enabled. This
108 provider should be enabled by default and may either work standalone
109 as the only provider or as an assistance for the GPS hardware to lock.
110 
111  - Add the silo; special exception for lxc-android-config: see https://wiki.ubuntu.com/Touch/Testing/lxc-android-config
112  - If noted, deploy an updated custom tarball:
113  - Download the tarball under /tmp ('''NOT''' under /)
114  - Unpack there: `cd /tmp; sudo tar xvf custom-vendor-here-*.tar.xz`
115  - Remove older bits: `sudo rm -rf /custom/vendor/here/`
116  - Update custom bits: `sudo mv /tmp/system/custom/vendor/here /custom/vendor`
117  - Reboot
118  - After boot, check you have these three processes running on top of location-service:
119  - slpgwd
120  - posclientd
121  - ubuntu-espoo-service
122  - Make sure SIM is unlocked and attached to the network (has some reliable signal) and that WiFi is turned on.
123  - Install OSMTouch app
124  - Run OSMTouch app, hit the position button every other second until you get a blue circle showing your current location;
125 
126 # Connectivity API
127 
128 For integration of network-based positioning providers, the location
129 service offers a connectivity API that provides access to wifi and
130 cell measurements as well as information on the current overall
131 connectivity status of the device. Please execute the following
132 commands on a newly flashed device with a writable image:
133 
134  - `sudo apt-get update && sudo apt-get build-dep location-service && sudo apt-get install libubuntu-location-service-dev ubuntu-location-service-examples`
135  - `mkdir /tmp/build && cd /tmp/build && cmake /usr/share/ubuntu-location-service/examples/standalone/connectivity/ && make`
136  - `GLOG_logtostderr=1 ./connectivity`
137 
138 Verify that the output looks similar to:
139 
140  phablet@ubuntu-phablet:/tmp/build$ ./connectivity
141  Is wifi enabled: true
142  Is wifi hw enabled: true
143  Is wwan enabled: false
144  Is wwan hw enabled: true
145  umts(mcc: 262, mnc: 2, lac: 5313, id: 131948771, asu: 7)
146  (bssid: BC:F2:AF:AF:19:A2, ssid: devolo-bcf2afaf19a2, last seen: 1408955086, mode: Mode::infrastructure, frequency: 2462, strength: 72)
147  (bssid: 00:22:3F:35:43:58, ssid: JustAnotherWLAN, last seen: 1408955086, mode: Mode::infrastructure, frequency: 2412, strength: 24)
148  (bssid: 82:C7:A6:40:8C:4E, ssid: EasyBox-44D054, last seen: 1408955206, mode: Mode::infrastructure, frequency: 2417, strength: 17)
149  (bssid: 00:24:01:B8:32:8D, ssid: gra, last seen: 1408955086, mode: Mode::infrastructure, frequency: 2412, strength: 12)
150  (bssid: C0:25:06:3C:28:22, ssid: FRITZ!Box 6360 Cable, last seen: 1408954966, mode: Mode::infrastructure, frequency: 2412, strength: 17)
151  (bssid: 00:1C:4A:A5:B7:59, ssid: FRITZ!Box Fon WLAN 7170, last seen: 1408954966, mode: Mode::infrastructure, frequency: 2437, strength: 10)
152  Last seen changed for wifi (bssid: BC:F2:AF:AF:19:A2, ssid: devolo-bcf2afaf19a2, last seen: 1408955257, mode: Mode::infrastructure, frequency: 2462, strength: 72)
153  Last seen changed for wifi (bssid: 00:22:3F:35:43:58, ssid: JustAnotherWLAN, last seen: 1408955257, mode: Mode::infrastructure, frequency: 2412, strength: 24)
154  Signal strength changed for wifi: (bssid: BC:F2:AF:AF:19:A2, ssid: devolo-bcf2afaf19a2, last seen: 1408955257, mode: Mode::infrastructure, frequency: 2462, strength: 73)
155 
156 # Trust Store Integration
157 
158 Please note that we are assuming a freshly wiped system for testing
159 here. If you cannot fulfill that pre-condition, please run `rm -rf
160 /home/phablet/.local/share/UbuntuLocationService && sudo shutdown -r` prior to running the
161 tests:
162 
163 ## Unconfined
164 
165  - Open the browser, go to maps.google.com
166  - Observe the in-browser dialog asking for granting access to location.
167 
168 ## Confined Web-App
169 
170  - Open the Nokia Here web app, observe the trust dialog appearing.
171 
172 ## Confined Application
173 
174  - Open osmtouch and observe the osmtouch surface sliding up, presenting you with a trust dialog.