maestro
maestro copied to clipboard
Biometrics?
I have an app that I want to automate that performs some fingerprint biometric checks. We really only need to test on one platform, so can restrict it to Android emulators. Would it be possible to add execution of something like:
adb -e emu finger touch 1
In Maestro so that the script can provide the necessary fingerprint when needed? I've only just started looking at Maestro and find it promising. Thanks.
+1 for biometrics
We are implementing passkeys as a auth mechanism & cannot accept the passkey request in the maestro test without fingerpint
Having the same problem and just grab a workaround from the Maestro Slack channel. We can achieve it by running the localhost server and accessing it via Maestro JavaScript. The localhost can get a request and execute any command in the file system (e.g.: xcrun simctl push …) Hope this help.
@xuanmai-agilityio have you got a code snippet / repo showing how you achieve this?
@peterferguson Not fully tested with the push notification or any simulator/emulator control. But this snippet works with simple commands like ls, la,....
curl http://localhost:3000/runcmd\?cmd\=ls
hope this help
const express = require('express');
const { exec } = require('child_process');
const app = express();
const port = 3000;
app.get('/runcmd', (req, res) => {
const cmd = req.query.cmd;
exec(cmd, (error, stdout, stderr) => {
if (error) {
console.error(`Error executing command: ${error.message}`);
res.status(500).send('An error occurred');
} else {
console.log(`Command executed successfully: ${cmd}`);
res.send(stdout);
}
});
});
app.listen(port, () => {
console.log(`Server is running on port ${port}`);
});
+1 for biometrics
We have device authentication for app access that is constantly breaking. Would be great to be able to catch it with automated e2e tests.
There's some docs on Android Developers about simulating fingerprint, dropping it in case it's useful. It's emulator-only, though.
Just a note – there's no active development going on here, but if someone wants to take a stab at it, we are always more than happy to review the PR!
Hi, there is a similar command for iOS Simulator that emulates a biometric check. I believe this should be fairly straightforward to implement since maestro already uses simctl for some operations.
xcrun simctl spawn 'SIMULATOR_ID' notifyutil -p com.apple.BiometricKit_Sim.fingerTouch.match
xcrun simctl spawn 'SIMULATOR_ID' notifyutil -p com.apple.BiometricKit_Sim.fingerTouch.nomatch
xcrun simctl spawn 'SIMULATOR_ID' notifyutil -p com.apple.BiometricKit_Sim.pearl.match
xcrun simctl spawn 'SIMULATOR_ID' notifyutil -p com.apple.BiometricKit_Sim.pearl.nomatch
There are two separate notifications for TouchID and FaceID, but for some reason fingerTouch works for both in my tests.
+1 for biometrics
@RepliedSage11 Does this work in Maestro cloud?
I haven't tried Maestro Cloud.
@peterferguson Not fully tested with the push notification or any simulator/emulator control. But this snippet works with simple commands like
ls, la,....curl http://localhost:3000/runcmd\?cmd\=lshope this helpconst express = require('express'); const { exec } = require('child_process'); const app = express(); const port = 3000; app.get('/runcmd', (req, res) => { const cmd = req.query.cmd; exec(cmd, (error, stdout, stderr) => { if (error) { console.error(`Error executing command: ${error.message}`); res.status(500).send('An error occurred'); } else { console.log(`Command executed successfully: ${cmd}`); res.send(stdout); } }); }); app.listen(port, () => { console.log(`Server is running on port ${port}`); });
adb -e emu finger touch 45146572 adb -t 5554 emu finger touch 45146572
if i call the request in browser manually it's woking fine all times but when the cmd is executed through local host node server it's failing some times -> http://localhost:3000/runcmd?cmd=adb%20-e%20emu%20finger%20touch%2045146572
+1 to biometrics on iOS
Would it be possible to requalify this P3 into maybe a P1 or P2, as more and more mobile application and web3 uses passkey as authentication instead of login/password ?