Skip to main content

Biometric authentication for native mobile application

Biometric authentication in TestCloud supports the following OS and API:
OSSupported API
Android 11 or higher
iOS 13 or higher
  • LAContext class: This class is used to interact with the local authentication framework.

  • evaluatePolicy: The evaluatePolicy(_:localizedReason:reply:) method of LAContext that performs biometric authentication, such as verifying a user's face or fingerprint.

  • canEvaluatePolicy: The canEvaluatePolicy(_:error:) method of LAContext that checks whether a specific biometric authentication policy can be evaluated on the device.

Note:

The keyword is also accessible through the Katalon TestCloud Keywords plugin on Katalon Store. You can install the plugin to automatically load all TestCloud keywords into your Katalon project, without having to manually define them. To install the plugin, visit: Katalon TestCloud keywords.

The BiometricsAuthenticator class in Katalon TestCloud allows users to simulate biometric inputs to test native mobile applications. To use it, follow these steps:
  1. Open your project in Katalon Studio and go to Project Settings > Desired Capabilities > Remote. Add the boolean properties enableBiometricsAuthentication=True and autoAcceptAlerts=False.
    Note:
    • Setting the autoAcceptAlerts=False desired capability ensures that your test cases run smoothly with the biometric authentication feature.
  2. Add the keyword to your project.

    In the Keywords folder, create and declare the BiometricsAuthenticator class under package com.katalon.testcloud.

    public class BiometricsAuthenticator{
    @Keyword
    def authenticatePass();

    @Keyword
    def authenticateFail();
    }
You can now use the keyword to test biometric authentication.
Was this page helpful?