Page MenuHomePhabricator

Provide support for spoffing the physical geolocation on QA tests
Closed, DeclinedPublic

Description

If7a0d4e873fcecbe12a972a7b9e21a8d1b35c9be introduced a test for nearby on mobile but this will not always work as it uses the users current location and there may or may not be articles near that user.

Ideally we should create a dummy article with a known location and hard code the browser location so that it always reports a given location to take this element of uncertainty out of tests.

Can we get something in the selenium gem to support this.


Version: wmf-deployment
Severity: enhancement
Whiteboard: zfilipin
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=57333

Details

Reference
bz58720

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:38 AM
bzimport set Reference to bz58720.

jhall wrote:

As Jon pointed out to me, Chrome has an "Override Geolocation" under Settings/Overrides. So we just need to figure out how to get WebDriver tests to implement the same sort of override, and then we can set values for which we know matching content exists in our test environments.

jhall wrote:

Format for using a JSON response to override Firefox's geo.wifi.uri setting:

https://developers.google.com/maps/documentation/business/geolocation/#responses

jhall wrote:

Info on settings up a user prefs file for the Firefox app to consume when it launches:

http://kb.mozillazine.org/User.js_file

Change 103512 had a related patch set uploaded by Jhall:
[QA] WIP Spoof physical geolocation for browser tests

https://gerrit.wikimedia.org/r/103512

jhall wrote:

Changing bug status since task in still WIP.

Change 103512 abandoned by Jhall:
[QA] WIP Spoof physical geolocation for browser tests

Reason:
Needs to be re-worked.

https://gerrit.wikimedia.org/r/103512

Interesting blog post with code examples in C#

Faking Geolocation in Selenium WebDriver with Firefox

http://watirmelon.com/2014/09/18/faking-geolocation-in-selenium-webdriver-with-firefox/

greg removed a subscriber: Cmcmahon.
Jdlrobson renamed this task from Spoof the physical geolocation on QA tests to Provide support for spoffing the physical geolocation on QA tests.Jun 4 2015, 10:00 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson edited projects, added Release-Engineering-Team; removed Web-Team-Backlog.