Comment on page
Testing & QA Guide
Testing and Quality Assurance for OkHi in your app
Quality Assurance for an OkHi integration involves testing and verifying that the integration works as expected and meets the required quality standards. The integration may vary depending on your specific use case and requirements, however, there are general guidelines on how to test if your implementation is operating correctly.
The most common mistake that we see teams make is not clearly understanding how verification differs from collection and validation. In our implementation, address creation is when the user creates their address via the webview screens that we provide. This then registers a geofence on the mobile operating system which periodically sends transit data (see transit data types) to our servers. Our AI models then use that data to create a profile of how much time the user spends inside the geofence and will determine their status.
The speed of our verification process depends significantly on the amount and quality of the transit data that we get sent from the device. There is no single pattern that we look for and are actively filtering out potential fraud or false positives. Even with the best data, we wait at least 36 hours before being confident enough to verify an address and the longest we will keep trying for is 8 days.
Our system is designed to confidently determine where a normal user lives and moves with their device. This can make it hard to simulate in a test without 'normal' behaviour.
There are 3 parts to testing if OkHi has been integrated correctly:
This starts with Onboarding users about permissions and expectations through the various steps in creating an address. Note that there is some branching logic about using a previous address (from our address book) or if you're at the address currently. Typically the priming screens are done by your developers (see live examples) and the actual location permission prompts are done by our webviews. It's worth adding that 'permission settings' include location permissions as well as "protected apps" which apply to low-end Android phones by excluding your app from those when it significantly throttles background services & apps to save battery.
Creating an address takes 3 steps, first to drop the pin on the map, second is an optional step to add a street view image (your developers may have opted out of this step), and third to capture the text address description. Note that for testing purposes, where the GPS pin is dropped needs to be the most accurate as that is what we use for our geofence. You can intentionally drop the pin in a location where you will not be at to test a failed verification.
After the address is created, it should show up in your address book for subsequent tests. You can create up to 20 locations on a single device. After that, you will need to delete the app, clear all data and reinstall a fresh version to continue testing.
Some of our code libraries will automatically start verification, but it is possible that your developers have modified these calls or not initiated them. In that case, you will have an
address createdbut no
verification:started. A created address will show up in your address book in the creation stage or by logging into okhi.me. If verification has started it will show up in the OkHi Customer dashboard.
There is very little that you can do to influence the verification process (by design) other than to ensure that there are enough transit data points coming through. (See the Guidelines below for more info.)
Our system should also trigger a message to the user (via email, SMS or WhatsApp depending on implementation preferences) when a new user has started verification for the first time.
Any end user can log into www.okhi.me (with an OTP SMS authentication) to see their address book and status. This can be a handy tool for testing to check what the status is in our system for multiple test addresses. This is also where users can opt out of data collection and tracking for us to stay compliant with data protection and privacy laws.
Here are some general tips and guides that increase the chances of a speedy verification. Note that these are general pointers and have various exceptions. These are not exact instructions as the models factor in many data points and patterns, specifically optimised to discount abnormal or unusual behaviour. (And location testing behavioural patterns typically look very different to the real-world behaviour of users.)
- It helps to send at least 10 transit data events for a particular address in a 48-hour period. You may need more, or succeed with less depending on how accurately your behavior mimics a real user.
- If your test device stays in the office then you are likely to fail verification as our services will see it as fraud. (There are exceptions to this.) Taking it to lunch to trigger geofence enters and exits create more realistic data.
- If there isn't much movement with the test device, then it is good to open the test app at least once an hour during the testing period to trigger more data being sent.
- Our services are biased towards evening and nighttime data, so if you're only sending transit data during the day then more is better. Early mornings when you arrive at work or last thing before you leave can also help.
- Leaving the app open will not send additional data.
- GPS accuracy can vary a lot, particularly with older phones, when you're on low battery, or deep inside a building with poor reception. This can cause your device location to jump around a lot and means that you need to walk a few hundred meters away to confidently fire geofence events. (we aggregate data points to improve accuracy on the backend later.)
- OS-level geofence data can have delays depending on OS, so leaving an area for only a very short period can sometimes not register as an enter or exit.
Our team is here to help.
We've done this a lot and are always on hand to help you troubleshoot to check the implementation. Send us a test build or ask us to check the actual data payloads for a test device if you need help troubleshooting.