Last modified: 2014-10-19 17:44:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T60720, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 58720 - Spoof the physical geolocation on QA tests
Spoof the physical geolocation on QA tests
Status: NEW
Product: Wikimedia
Classification: Unclassified
Quality Assurance (Other open bugs)
wmf-deployment
All All
: Low enhancement (vote)
: ---
Assigned To: Chris McMahon
zfilipin
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-12-19 23:11 UTC by Jon
Modified: 2014-10-19 17:44 UTC (History)
3 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Jon 2013-12-19 23:11:16 UTC
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.
Comment 1 Jeff Hall 2013-12-19 23:25:27 UTC
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.
Comment 2 Jeff Hall 2013-12-23 22:22:37 UTC
Looks like there is a Chrome method for overriding geolocation:

https://developers.google.com/chrome-developer-tools/docs/protocol/tot/page#command-setGeolocationOverride
Comment 3 Jeff Hall 2013-12-24 00:17:46 UTC
Format for using a JSON response to override Firefox's geo.wifi.uri setting:

https://developers.google.com/maps/documentation/business/geolocation/#responses
Comment 4 Jeff Hall 2013-12-24 00:24:54 UTC
Info on settings up a user prefs file for the Firefox app to consume when it launches:

http://kb.mozillazine.org/User.js_file
Comment 5 Gerrit Notification Bot 2013-12-24 00:49:34 UTC
Change 103512 had a related patch set uploaded by Jhall:
[QA] WIP Spoof physical geolocation for browser tests

https://gerrit.wikimedia.org/r/103512
Comment 6 Jeff Hall 2013-12-26 18:51:36 UTC
Changing bug status since task in still WIP.
Comment 7 Gerrit Notification Bot 2014-02-26 03:11:15 UTC
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
Comment 8 Željko Filipin 2014-09-01 17:02:47 UTC
The same as bug 57333?
Comment 9 Željko Filipin 2014-09-22 16:59:18 UTC
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/

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links