Overview
LambdaTest App Test Automation enables you to run your Patrol tests on real Android devices in the cloud. The platform offers over 3000+ real devices and browsers for comprehensive testing.Prerequisites
Create LambdaTest account
Sign up for a LambdaTest account if you don’t have one.
Get your credentials
Find your username and access key in your LambdaTest Profile.
Setup for Android
Update test runner
Modify your app-level build.gradle file to use the LambdaTest-specific test runner:
The
LambdaTestPatrolJUnitRunner is a specialized test runner that integrates with LambdaTest’s infrastructure and ensures proper test execution on their platform.Running Tests
Follow these steps to run your Patrol tests on LambdaTest:Build APKs
Build your app and test instrumentation APKs using Patrol:This creates:
build/app/outputs/apk/debug/app-debug.apk(app under test)build/app/outputs/apk/androidTest/debug/app-debug-androidTest.apk(test suite)
Upload app to LambdaTest
Upload your app APK to LambdaTest using their REST API:The response will contain an
app_url like lt://APP1016047291733313441063634. Save this for the next steps.See LambdaTest’s documentation for more details.
Upload test suite to LambdaTest
Upload your test instrumentation APK:The response will contain a
test_suite_url like lt://APP1016047291733312896265135. Save this for execution.See LambdaTest’s documentation for more details.
Execute tests
Start the test execution by making a POST request with your test configuration:
Configuration options:
app- The app URL from step 2testSuite- The test suite URL from step 3device- Array of device configurations (format: “DeviceName-OSVersion”)queueTimeout- Maximum time to wait for device availability (seconds)deviceLog- Capture device logs during test executionnetwork- Capture network logsbuild- Build name to organize tests in dashboard
See LambdaTest’s documentation for all available options.
Example Execution
Here’s a complete example of a successful test execution:Viewing Results
After starting a test execution, you can:- View in Dashboard: Go to the LambdaTest App Automation Dashboard to see live test execution
- Access Logs: View device logs, network logs, and screenshots
- Download Videos: Download video recordings of test execution
- Check Status via API: Use the
buildIdto query test status
Available Devices
LambdaTest offers a wide range of Android devices. Popular configurations include:Popular Android Devices
Popular Android Devices
- Visit the LambdaTest Automation Capabilities Generator
- Select “App Automation” and “Espresso”
- Browse available devices and generate configuration
Configuration Options
Customize your test execution with these configuration options:Test multiple devices
Test multiple devices
Run tests on multiple devices in parallel:
Enable geolocation
Enable geolocation
Test location-based features:
Network simulation
Network simulation
Test under different network conditions:Available profiles:
4G, 3G, 2G, offlineCustom timeout settings
Custom timeout settings
Configure timeouts for your tests:
queueTimeout- Max wait time for device availability (seconds)idleTimeout- Max idle time before test is terminated (seconds)
Best Practices
Enable Device Logs
Always set
deviceLog: true to capture detailed logs for debugging failures.Use Build Names
Organize tests with meaningful build names to track test runs over time.
Test on Real Devices
Use real devices instead of emulators for more accurate test results.
Set Reasonable Timeouts
Configure
queueTimeout and idleTimeout based on your test duration.CI/CD Integration
Integrate LambdaTest into your CI/CD pipeline:Troubleshooting
Authentication failed
Authentication failed
Verify your credentials:Make sure there are no extra spaces or special characters. Get fresh credentials from your LambdaTest profile.
Upload failed
Upload failed
Common upload issues:
- File not found: Verify the APK path is correct
- File too large: LambdaTest has file size limits (typically 1GB)
- Invalid APK: Ensure the APK was built successfully
Device not available
Device not available
If the device is busy or unavailable:
- Check the device list for correct device names
- Try a different device or wait and retry
- Increase
queueTimeoutto wait longer for device availability - Verify your LambdaTest plan includes the requested device
Tests don't start
Tests don't start
If tests are uploaded but don’t execute:
- Verify you’re using
LambdaTestPatrolJUnitRunnerin yourbuild.gradle - Check that both app and test suite URLs are correct
- Review the LambdaTest dashboard for error messages
- Ensure the test APK is properly built with
patrol build
Next Steps
BrowserStack
Compare with BrowserStack App Automate
Firebase Test Lab
Explore Google’s Firebase Test Lab