Mobile testing
Learn how to test mobile applications using Test Companion. This includes connecting your app, managing the test lifecycle, and automating your mobile testing process.
Test Companion goes beyond web application testing to provide comprehensive mobile testing capabilities for both iOS and Android apps. You can generate test cases and write automation code, all from your IDE, utilizing real devices on BrowserStack’s cloud infrastructure.
Mobile testing with Test Companion operates similarly to web testing. You select your app, describe your requirements in the chat, and the AI takes care of the heavy lifting. The key difference is that instead of connecting to a simulator/emulator, Test Companion connects to a real mobile device running your app. It captures screenshots and UI hierarchy data, using that information to generate accurate, device-specific test code.
What you can do with mobile testing
Test Companion supports the test lifecycle, which covers the full QA workflow. This includes generating test cases from requirements or app exploration, automating those test cases into executable scripts, and running them on real devices.
→ Test lifecycle
How it works
When you switch to App mode and connect your app, Test Companion initiates a real device session using BrowserStack’s App Automate infrastructure. The AI interacts with your app by capturing both the UI hierarchy (the XML tree of every element on the screen) and visual screenshots. This dual approach enables the AI to reliably identify elements, even when accessibility IDs are absent, and to generate automation code that employs the most effective locator strategy.
The process generally follows these steps:
- Switch to App mode: Toggle from Web to App at the bottom of the Test Companion panel.
-
Connect your App: Upload an
.apk,.aaband.xapkfor Android and.ipafor iOS file, or select one previously uploaded to BrowserStack. - Describe your task: Use the chat feature to describe the task, such as generating test cases, writing automation code, etc.
- AI works on a Real Device: Test Companion launches your app on a real device, explores it, and generates scripts based on its findings.
- Review and run: The AI provides test cases, automation scripts, or suggestions for fixes directly in your IDE. If you have a local or BrowserStack test execution setup, it can also run the tests for you.
Supported app formats
| Format | Platform | Description |
|---|---|---|
.apk |
Android | Standard Android application package |
.aab |
Android | Android App Bundle (Google’s publishing format) |
.xapk |
Android | Extended APK format that can include additional resources |
.ipa |
iOS | Standard iOS application archive |
You can upload a new app file directly or select from apps that you have already uploaded to your BrowserStack’s App Automate.
Next steps
- Connect your App: Learn how to upload or select a mobile app and initiate a device session.
- Generate test cases: Create test cases based on requirements or by exploring the live app.
- Automate tests: Generate executable automation scripts in any supported framework.
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
We're sorry to hear that. Please share your feedback so we can do better
Contact our Support team for immediate help while we work on improving our docs.
We're continuously improving our docs. We'd love to know what you liked
Thank you for your valuable feedback!