How to test Biometric authentication using Appium?

On This Page Importance of Testing Biometric Authentication

February 12, 2026 · 8 min read · Tool Comparison

How to test Biometric authentication using Appium?

Appium is an exposed source solution for cross-platform mechanisation examination of peregrine applications. For Android and iOS mobile applications, it now proffer a smooth automation test experience. Appium functions similarly to a node.js waiter. It was a CLI-only plan mostly installed using the node bundle direction a few geezerhood ago.

At its core, Appium uses an HTTP host that render REST API. The client uses REST APIs to interface with the Appium server, which Mobile JSON Wire Protocol handles.

Overview

Why Test Biometric Authentication?

  • Validates security workflows and user authentication.
  • Ensures fallback mechanisms work as expected.
  • Helps name failures caused by twist or OS interruptions.

Challenges in Biometric Testing

  • Compatibility Issues with different Devices/OS
  • Limited biometric ironware on simulators/emulators.
  • Security restrictions that complicate automation.

Automating Biometric Authentication using Appium

  • Launch app and configure automation potentiality to enable biometric examination.
  • Send fingerprint id by javascript executor command of Appium.
  • Trigger fingermark success and failure scenario using emulator/simulator commands.
  • Verify successful navigation after authentication and check for fault substance on failures.
  • Confirm consistent results across multiple device and OS versions.

This article will explore on how to enable biometric testing with Appium, simulate fingermark activeness, and validate assay-mark flows effectively

Importance of Testing Biometric Authentication

There are many reward to Biometric authentication testing in the mobile app:

  • Verify functionality and security of biometrics
  • Validate Accurate Identification and Authentication.
  • Enhanced User Experience
  • Test biometrics with real-world intervention like phone calls, messages, and notifications
  • Verify the compatibility of biometric-driven mobile applications with various device, platform, and work systems

Top 3 Challenges in Testing Fingerprint Authentication

The fingerprint revolution is instigative for mobile software inventors. Yet integrating biometric engineering data into roving operations also gainsay QA brigades. They include the following:

1. Compatibility Issues with different Devices/OS

Fingerprint isn & # 8217; t compatible with all types of nada and bias. So it & # 8217; s veritably delicate to detect a proper device to test fingerprints.

  • Android bod includes support for expression and fingerprint certification. Android may be customized to back other biometric modules (like to Iris). Still, the biometric system combination will count on biometric security, not modality.
  • iOS requires that the device undergoes a registration procedure with the Touch ID or Face ID service before using the authentication tackle. still, device registration isn & # 8217; t supported for bias running iOS 15 or afterward. point simulation works with any Android or iOS twist that supports the rigging point anthology.

Learn More: ?

2. Security concerns while testing Sensitive Data

QA teams must act aboard security engineers and legal advisors to ascertain peregrine covering responsibly treat biometric information.

  • Beyond simply complying with system weather, it may be helpful for screen teams to implement with biometric datum to determine which information user are comfortable with for aggregation and ensure that users can opt out of biometric functionality when appropriate.
  • This type of testing may not be the inaugural that comes to mind when you cogitate of useableness.
  • Still, from the user ’ s perspective, ensuring a positive experience and avoiding issues about spyware or seclusion invasion by a mobile covering is crucial.

3. Limitations of Emulator/Simulators in examine Biometric certification

One singular hard-nosed difference that arises from biometric data in mobile device is that, in difference to other types of input, biometric information can be hard to mimic when you run test on simulated or emulate roving device.

  • This is one intellect why having real device or an available for testing is so crucial in a biometric-driven universe. Failing that, biometric data could however be fed to a mobile test environment inside a simulator or emulator.
  • However, at some point before the coating ’ s release, examine on real hardware with real biometric stimulant devices is still preferred because sustaining data into a simulated test environment unnaturally perform not let you to test all of the variable that are at play when you ’ re dealing with biometric data that is input immediately via hardware.

Read More:

SUSA automates exploratory testing with persona-driven behavior, catching bugs that scripted automation misses.

Preparation for Appium Fingerprint testing

If you & # 8217; re wondering how to automate fingerprint using Appium, let & # 8217; s get into the initial steps

Prerequisites for testing

Appium fingerprint authentication following are prerequisites:

  1. Install any programming words (Java/python/ruby/c #) (Here we are utilise python)
  2. Android Studiofor emulator
  3. Android Application with a fingerprint feature
  4. Install any codification editor (Here we are habituate pycharm)

Setting up the Test environment

After install all prerequisites, follow the below steps for setup environment:

  1. Create a project in pycharm: open pycharm→ open file → click new project → select location of projection → enter name of project → click on create button.
  2. Now install appium lib for python: unfastened terminal → enter command (pip install Appium-Python-Client).

Setting up the emulator for fingermark testing

  1. Create an imitator in android studio which is compatible with the fingerprint lineament.
  2. Open that emulator
  3. Go to Settings → Security & amp; Location → Fingerprint → Next → Fingerprint +pin → confirm pin.
  4. After confirming the pin, we must provide the needed fingerprint opinion in the emulator. For that follow the below steps:

a.Click on three DoT (& # 8230;) in the emulator menu alternativeb.Redirect to extended controls, Here tick on fingerprint

c.Click on Touch Sensor two times.

d.Click on done, Now your emulator is ready for Fingerprint testing.

How to automate Biometric Appium Tests?

Including Biometric Appium tests means we ask to be keenly cognizant of the exam substructure used to simulate fingerprint actions locally against aper.

are performed from a server to which the devices are join. It provides a context whereby we can insert device-specific commands against the device, in bond with the calls through the testing fabric itself, to simulate the entire workflow on the device in one script.

To simplify it, check out the support on.

Writing Test Cases

Now, we are designing the basic tryout cases for Appium fingermark testing using an ape. In the above of this document, we have refer the setup of an emulator for fingerprints. And for quiz, we are using a demo covering. So we have designed three canonic exam cases for the fingermark testing given below and used python programming language to write code. Please review this clause for.

1. Test case to control the availableness of the Biometric authentication feature

In this examination case we verify the fingerprint lineament available in the emulator. Opening an app with a fingerprint feature employ Appium and till now, we have not enable fingerprint in the device.

So when we open the app then, it gives and pop for define up a fingerprint. So we are asserting that pop-up.

Test Steps are the undermentioned:

  • Launch the app
  • Wait to open the app
  • Verify pop-up for inaccessibility of fingerprint
  • Verify another pop-up for the same

Code Snippet:

import time from appium import webdriver # Desire potentiality for device and app desired_caps = {'platformName ': 'Android ', 'platformVersion ': ' 9 ', 'deviceName ': `` Pixel3XL '', 'udid ': 'emulator-5554 ', 'appPackage ': 'com.pro100svitlo.fingerprintauthdemo ', 'appActivity ': 'com.pro100svitlo.fingerprintauthdemo.MainActivity'} # method for test steps def verify_the_availability_of_the_biometric_authentication (): # initiate driver with given capabilities driver = webdriver.Remote (`` http: //127.0.0.1:4723/wd/hub '', desired_caps) time.sleep (2) # assert for certification accessibility assert driver.find_element_by_xpath ('// * [@ text= '' Please verify that at least one fingermark has be file on the device ''] ') \ .is_displayed () == True assert driver.find_element_by_xpath ('// * [@ text= '' Attention ''] ') .is_displayed () == True, f'Fingerprint is enabled' driver.close ()

2. Test case to verify the successful authentication using Biometrics

In this tryout causa, control successful authentication using fingermark.

  • Launch the app
  • send fingerprint id by javascript executor command of appium. (Here mail the id as 1, we set it before in the ape)
  • verifying redirection of the screen after successful authentication.

Code Snippet:

significance time from appium importation webdriver # desire capabilities for device and app desired_caps = {'platformName ': 'Android ', 'platformVersion ': ' 9 ', 'deviceName ': `` Pixel3XL '', 'udid ': 'emulator-5554 ', 'appPackage ': 'com.pro100svitlo.fingerprintauthdemo ', 'appActivity ': 'com.pro100svitlo.fingerprintauthdemo.MainActivity'} def verify_biometric_authentication_successful (): driver = webdriver.Remote (`` http: //127.0.0.1:4723/wd/hub '', desired_caps) time.sleep (2) driver.execute_script (`` adb -e emu digit touch 1 '') assert driver.find_element_by_xpath ('// * [@ text= '' GO TO MAIN ACTIVITY ''] ') .is_displayed () == True, f'Fingerprint Authentication is not success' driver.close ()

3. Test suit to verify the Unsuccessful authentication using wrong Biometrics

In this test case, control successful authentication using fingerprint.

  • Launch the app
  • send the wrong fingerprint id by the javascript executor command of Appium.
  • verifythe wrong fingermark pop-up.
  • verifying the app is not airt to the next screen.
  • send the wrong fingerprintmany times and verify the retry text.

Code Snippet:

significance time from appium import webdriver desired_caps = {'platformName ': 'Android ', 'platformVersion ': ' 9 ', 'deviceName ': `` Pixel3XL '', 'udid ': 'emulator-5554 ', 'appPackage ': 'com.pro100svitlo.fingerprintauthdemo ', 'appActivity ': 'com.pro100svitlo.fingerprintauthdemo.MainActivity'} def verify_biometric_authentication_successful (): driver = webdriver.Remote (`` http: //127.0.0.1:4723/wd/hub '', desired_caps) time.sleep (2) driver.execute_script (`` adb -e emu fingerbreadth touch 2 '') assert driver.find_element_by_xpath ('// * [@ text= '' GO TO MAIN ACTIVITY ''] ') .is_displayed () == False, f'Fingerprint Authentication is success' driver.execute_script (`` adb -e emu finger touch 2 '') driver.execute_script (`` adb -e emu digit touch 2 '') driver.execute_script (`` adb -e emu finger touch 2 '') assert driver.find_element_by_xpath ('// * [@ text= '' Can rehear in 01:30 ''] ') .is_displayed () == True, f'Fingerprint Authentication is success' driver.close ()

Conclusion

In this article, we described how to quiz Biometric authentication utilize Appium. This article was created with a specific tech stack, but we can use many times of tech stacks in fingerprint authentication testing. BrowserStack App Automate enable you to test native and hybrid mobile coating using the Appium automation framework on 1000 of real Android and iOS device.

Also, advert to the undermentioned Appium tutorial for Android and iOS gimmicks:

Tags
10,000+ Views

# Ask-and-Contributeabout this topic with our Discord community.

Related Guides

Automate This With SUSA

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts needed.

Try SUSA Free

Test Your App Autonomously

Upload your APK or URL. SUSA explores like 10 real users — finds bugs, accessibility violations, and security issues. No scripts.

Try SUSA Free