Skip to main content

Biometric authentication for native mobile application

Important:

You have installed the Katalon TestCloud Keywords plugin to automatically load all TestCloud keywords into your project without having to manually define them. If you have not, visit Katalon Store: Katalon TestCloud keywords.

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.

The BiometricsAuthenticator.authenticateFail and BiometricsAuthenticator.authenticatePass keywords in Katalon TestCloud allows users to simulate biometric inputs to test native mobile applications. To use it, follow these steps:
  1. In Katalon Studio, click the Profile drop-down and select Reload Plugins to make sure the plugin is installed.
  2. Go to Project Settings > Desired Capabilities > TestCloud.
  3. In the TestCloud table, add a katalon:options property, set Type as Dictionary, then click the ....
  4. In the Dictionary Property Builder, add the boolean properties enableBiometricsAuthentication=True and autoAcceptAlerts=False.
    Note:
    • The autoAcceptAlerts desired capability ensures that your test cases run smoothly with the biometric authentication feature.
  5. Add the authenticateFail and authenticatePass keywords to your test case as needed.
  6. Configure your TestCloud mobile environment and run the test.
Was this page helpful?