How Do You Test Automated Data Entry for Mobile Web Apps? [Snippet]
Learn how to use the image scanning technology that enables fingerprint and face ID for automated data entry in your mobile web application.
Join the DZone community and get the full member experience.Join For Free
These days, many brands are finding new ways of streamlining the user experience in order to drive higher adoption rates, increased security, and user satisfaction. Onboard sensors offer a great alternative to tedious manual data entry; in many cases, this not only enhances and simplifies the user experience, but also can allow for the creation of new and compelling flows.
Indeed, the successes which have followed the addition of fingerprint ID- and soon, faceID- are well documented. A common misconception in the marketplace, however, is that access to these sensors and other technologies is limited to native apps alone. What if you could enable similar features in mobile web applications? Clearly, your app would become accessible to more users, code maintenance for multi-platform apps would be lower, and thus the number of bugs would fall as well.
One great example of this evolution can be seen in mobile web apps using image scanning as a replacement for manual text entry. We were recently approached by one of our customers with a similar use case for automated data entry- they needed to generate bank accounts for their users and the verification based on scanning their driver's' licenses in such a case, scanning of the driver's license would streamline the entry of many details.
Figure 1: Mobile Web App Image Scanning.
The advantages of this type of automation are clear; however, it does present new challenges for the tester. In this example, these would range from how to emulate various driver license details to sub-optimal imaging conditions (distorted/smudged images, etc.)
Figure 2: Testers need to consider different data inputs and imaging conditions.
Luckily, when they request access to the camera, most web browsers also enable access to the device's file system. Using Perfecto's file transfer utility, the customer could upload images ahead of time or on the fly. Using a variety of images, it is possible to emulate the front and back of driver's licenses, check images, barcodes etc. Likewise, this methodology would be useful to modern retail apps which assist buyers in trying on clothing and many insurance companies which allow their users to open a claim scanning their licenses .
Figure 3: Mobile Web app Access to Camera Typically Enables Also File Access.
The future of mobile apps is an ever-improved user experience using this type of automation technology. An end-to-end approach for testing mobile web app imaging is made possible through leveraging preloaded images onto the device. This test automation, in turn, enables rapid feedback and scaling of code coverage.
See code snippet that you can use to automate the process:
Published at DZone with permission of Amir Rozenberg, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.