How to Test Secured Android Apps Using Espresso
Learn how Android developers can re-use an automated test they wrote for a non-secured app using the Espresso automation tool (in Android Studio) and run it on the Appdome-secured app.
What is Espresso?
Espresso is a test automation tool for Android applications developed by Google. It enables developers and testers to write automated tests for the Android UI.
How to Test Appdome-secured Apps Using Espresso
Note: The tester must have the Espresso test apk and the target fused app apk to be tested. However, in order for the process to succeed, both Espresso test apk and the Appdome-secured app must be signed by the same developer/signer.
To run the Espresso automated test through a computer terminal follow these steps:
- Connect the phone to your computer using USB cable.
- Make sure the phone is reachable by Android Debug Bridge (adb):
adb devices - Install the Appdome-secured app (test target app) on an Android mobile device.
- On the computer run the following command:
adb shell am instrument -w -m -e debug false \
-e class ‘<YOUR_APP_BUNDLE_ID>.<YOUR_TEST_NAME>’ \
<YOUR_APP_BUNDLE_ID>.test/android.support.test.runner.AndroidJUnitRunner
For example:
app bunder id: com.android.myapp
Espresso test name: myTest
adb shell am instrument -w -m -e debug false \
-e class ‘com.android.myapp.myTest’ \ com.android.myapp.test/android.support.test.runner.AndroidJUnitRunner
Related Articles
- How to Use Appdome’s Build2Test Service
- How to Test Secured Android Apps on Browserstack
- How to Test Secured iOS Apps on Browserstack
- Test Appdome-secured Android Apps by Using Lambdatest
- Testing Secured iOS Apps by Using Lambdatest
- Testing Secured Android Apps by Using BitBar
- How to test iOS apps by using Bitbar
If you have any questions, please send them our way at support.appdome.com or via the chat window on the Appdome platform.
Thank you!
Thanks for visiting Appdome! Our mission is to secure every app on the planet by making mobile app security easy. We hope we’re living up to the mission with your project. If you don’t already have an account, you can sign up for free.