Skip to content

QA on dev.drive.vote

John McGrath edited this page Oct 24, 2016 · 7 revisions

We have an instance of the app running on https://dev.drive.vote which is configured identically to production, but runs on a separate non-production database. It's meant for QA.

To set up dev.drive.vote so that you can use it to do end-to-end QA, testing interactions of the conversation bot, driver app, and dispatch app:

Create Accounts

  • Create a ride zone dispatcher user associated with the 'Las Vegas, NV' ride zone.
  • Create a driver user for the same ride zone. You can use the volunteer sign up for that every ride zone--here's the one for LV: https://dev.drive.vote/volunteer_to_drive/las_vegas

Log in

  • Log into the dispatcher app with the dispatcher user at https://dev.drive.vote/, you'll see a link to the dispatch app at upper right, which should open the dispatch page for Las Vegas in another tab: https://dev.drive.vote/dispatch/las_vegas.
  • In a different browser (or an incognito window) log into the driver app using that user at https://dev.drive.vote/driving. If you're already logged in as that user you should see a link to the driving app in the upper right.
    • Even better would be to use a phone simulator like the one that comes with Xcode. You can't use a real phone unless you're in Las Vegas, since you'll need to spoof your location.
    • In driver app window (or simulator) set it up to spoof a Las Vegas location. In the Xcode iPhone simulator this can be done under the "Debug -> Location -> Custom Location" option

Spoofing device and location

  • You can use the Chrome console to enable 'device mode' for better mobile testing: https://developers.google.com/web/tools/chrome-devtools/device-mode/
  • You can spoof you location in Chrome--see the screenshot below. Once you open 'sensors,' select 'Custom Location' in the 'Geolocation' dropdown The lat/lng of Las Vegas is 36.1699/-115.1398.
  • You can also spoof location by adding 'latitude' and 'longitude' query params to the URL. For example /driving?latitude=28.532&longitude=-81.37
  • Using either your phone or a messaging app like iMessages, text a ride request to the dev Las Vegas ride zone phone number, (702) 489-0894.
    • You can configure iMessages to use your phone number, which makes QA easier. Follow the instruction in this Apple Support article.

QA

  • You should be able to interact with the bot, and simultaneously see the conversation and messages appear in the driver app, as well as the ride once it's created. You should also see voter & driver pins on the map.

Location spoof screenshot

Resetting everything

  • If you want to be able to initiate a new session from the same phone number, you have to remove the history of your previous interaction--otherwise new messages in may get appended to previous conversations, rather than starting new ones. To reset:

Clone this wiki locally