How to provide login credentials to an automated android test? : <p>I'm looking for a way to "provide a login" to my app so an automated test "is logged in" and can test the entire app. Currently it's of course blocked by the login-screen.</p>

<p>Because I'm using SmartLock for Passwords, this might be a chance to provide some credentials for the test - but I don't know how.</p>

<hr>

<p>Is there some best-practice to provide credentials to / skip the login during a test? I could think of a special buildType / -flavor which is mocking the login but this way it can't be used to test a release build.</p>

<p>It would be great when I could test a final release build which can be uploaded to the store when the test succeeds. This way, I could use the embedded pre-launch-reports in the PlayStore as well (which would be really nice).</p>
