Biometric Authentication

Mobile Testingadvancedaka Biometric Authaka Face IDaka Touch ID

// Definition

Logging in via fingerprint, face, or iris instead of a password — Touch ID / Face ID on iOS, BiometricPrompt on Android. The app delegates to the OS, which returns success/failure without exposing the biometric data. QA tests the fallbacks as much as the happy path: what happens on no-match, no enrolled biometric, hardware unavailable, or lockout after repeated failures.

// Why it matters

Biometric auth gates account access, so its failure modes are security-critical: a fallback that's weaker than the biometric (or skips straight in on failure) is a vulnerability. QA matters because the failure paths — lockout, fallback to PIN, unenrolled device — are where the bugs and the security holes live, and they're easy to skip because the happy path "just works" on the tester's enrolled device.

// How to test

// Simulate biometric outcomes via the emulator/driver (don't need a real finger)
// Android: adb emu finger touch <id> ; iOS: simulated Face ID enrol/match
await driver.execute('mobile: sendBiometricMatch', { type: 'finger', match: true })
expect(await driver.$('~dashboard').isDisplayed()).to.be.true

// no-match → must fall back to PIN, not bypass auth
await driver.execute('mobile: sendBiometricMatch', { type: 'finger', match: false })
expect(await driver.$('~pin-fallback').isDisplayed()).to.be.true

// Common mistakes

  • Testing match only, skipping no-match, lockout, and unenrolled-device paths
  • A fallback that's weaker than the biometric (defeats the point)
  • Not handling "hardware unavailable" (older devices / no sensor)

// Related terms