android / identity-samples

Multiple samples showing the best practices in identity on Android.
Apache License 2.0
322 stars 198 forks source link

How to Write Automated Tests for Google Password Manager in an Android App? #82

Open SinaSeylani opened 1 month ago

SinaSeylani commented 1 month ago

I am developing an Android app with a login feature that utilizes passkeys. I would like to write automated tests for this part of the app where the Google Password Manager shows up.

Here is the flow I want to test:

1- Click on "Login with Passkeys".

2- The Google Password Manager shows up.

3- Mock the response from the Google Password Manager with success.

4- User lands on the next screen.

I am looking for guidance on how to achieve this. Specifically, how can I mock the response from the Google Password Manager in my automated tests?

image