feat(biometric): Face ID / Touch ID / fingerprint testing (v0.9.7)#110
Merged
Conversation
New ProbeScript steps and matching annotation DSL classes for driving biometric auth flows on iOS Simulator and Android emulator without real hardware. Skipped on physical devices with a warning (same pattern as set location, allow permission, and other simulator-only ops). Parser 2 new keywords (TOKEN_BIOMETRIC, TOKEN_ENROLL), 3 new ActionVerb constants (VerbEnrollBiometric, VerbBiometricMatch, VerbBiometricNoMatch), 2 new dispatch cases in parseStep, parseBiometric and parseEnrollBiometric helpers. 3 new parser_test.go tests covering every form. Runner EnrollBiometric, BiometricMatch, BiometricNoMatch methods on DeviceContext. iOS uses xcrun simctl spawn booted notifyutil -p com.apple.BiometricKit_Sim.faceCapture.match / .no-match (and the fingerTouch.* equivalents, so the same step works on Face ID AND Touch ID devices). Android uses adb -s <serial> emu finger touch <id> where id=1 is matching (must be pre-enrolled) and id=9999 is no-match. Physical devices skip with a warning, same pattern as SetLocation. Dispatch cases in Executor.runAction; human-readable strings in stepDescription so verbose runner output reads naturally. Annotation DSL 3 new const Step classes — EnrollBiometric, BiometricMatch, BiometricNoMatch — added to probe_annotation/lib/src/steps.dart. Added to the const-constructibility test. Comprehensive doc comments document the iOS/Android command paths and the physical-device skip. Emitter 3 new cases in probe_gen/lib/src/probe_emitter.dart that produce 'enroll biometric', 'biometric match', 'biometric no match' lines. New biometric_auth fixture+golden pair covering happy path (match unlocks Dashboard) and unhappy path (no-match shows Authentication failed). Cross-language golden_integration_test auto-picks it up. Tests (strict) go test ./... 16/16 packages pass staticcheck ./... zero issues parser_test.go 3 new biometric tests pass probe_annotation dart test 3/3 const tests pass probe_gen dart test 12/12 builder tests pass (was 11; +biometric_auth) GoldenIntegration Go test 11/11 fixtures parse cleanly Astro npm run build 37 pages built clean Docs website/src/content/docs/probescript/syntax.md new Biometric section website/src/content/docs/probescript/annotations.md new Biometric subsection + DSL table entry docs/wiki/Annotations.md step DSL table updated README.md v0.9.7 callout added CHANGELOG.md (root) [0.9.7] entry probe_agent/CHANGELOG.md version-only bump probe_annotation/CHANGELOG.md feature entry probe_gen/CHANGELOG.md feature entry vscode/package.json, docs/wiki/Home.md, mcp.md version refs bumped Trade-offs (per user acknowledgement) Real Face ID and Touch ID require an actual face or finger — these steps are simulator/emulator only. Tests should target a simulator/emulator in CI; physical iOS/Android device paths skip with a warning so the test still completes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Three new ProbeScript steps that drive biometric authentication on iOS Simulator and Android emulator without real hardware. Test the happy path (match) and unhappy path (no-match) of every Face ID / Touch ID / fingerprint flow in your app.
Matching annotation DSL:
Implementation
xcrun simctl spawn booted notifyutil -p com.apple.BiometricKit_Sim.faceCapture.{match,no-match}(and.fingerTouch.*siblings, so same step works on Face ID and Touch ID devices)adb -s <serial> emu finger touch 1(matches enrolled id 1) /... 9999(no match)set location,allow permission)Test plan (strict)
go test ./...— 16/16 packages pass (including 3 new biometric parser tests)staticcheck ./...— zero issuesdart testprobe_annotation — 3/3 const tests passdart testprobe_gen — 12/12 builder tests pass (was 11; +biometric_auth golden)TestGoldenIntegration_DartEmittedFiles— 11/11 fixtures parse cleanly through Go parsernpm run buildwebsite — 37 pages built cleanDocs
🤖 Generated with Claude Code