Test Android app (.apk) on VMs running Android OS
Rainforest supports testing native Android phone and tablet applications. This document will walk you through the setup for Android app testing on a Virtual Machine running Android Emulator.
Testing your native Android application
Setting up your application file for testing:
Running your native Android tests on Rainforest is a snap. Follow these steps to set up your android application for testing.
1. Compile and export your application for testing. Make sure that your android .apk is compiled for x86, not ARM
2. Host your app somewhere that supports direct downloads. The hosted file URL MUST be a direct download link. If this is not the case, Rainforest will not be able to install the application
- Do not use links that redirect, require credentials, or limit access; the link should lead to a direct download.
3. To set up your app for testing, simply go to Settings > Sites. Under Apps, click (+) New Mobile Site,” select the "Type" and then add the URL for your Android direct download. Be sure to set the device type to “Android”
- Rainforest will automatically download and install your native Android application on our VMs from this URL when you create and run a mobile test.
Creating a new native Android test
- To create a new test for your native Android application, click New test, then select the test type 'App'
2. To set the test to the correct Android app source you wish to test by clicking the drop-down, and then select the URL for the .apk file you wish to test.
Note: Choosing the correct app source will determine which devices you will be able to run the test against.
3. Start a run Select the Android VMs you wish to test from the Platforms section
- NOTE: As Rainforest will automatically download, install and start your Android application for testing, you cannot select non-Android platforms for this test.
Can I reuse my existing web tests?
In most cases, a company’s web app and native app are fundamentally different, so you will not be able to reuse your existing web tests for your native app. However, in some cases, you can (and should!) reuse the work that you have already done.
If your mobile and web apps are very similar, you can simply copy the appropriate tests for your web app to a new test for your mobile application.
Native mobile app and web application tests are separated in the Rainforest interface, since they cannot share a starting URL.
- The URL for a web browser test serves as a direction for the testers
- The URL for a native app test is a source, where Rainforest will access and install your native application
Testing your build
If your app is not running properly on Rainforest’s VMs, we strongly recommend that you test it locally to ensure that your application is configured properly for x86.
Make sure your app URL is a direct download link
The hosted file URL MUST be a direct download link. If this is not the case, Rainforest will not be able to install the .apk file.
- “Note: If you are using a Dropbox link, please make sure your it ends in dl=1. See Dropbox help for more info.[https://www.dropbox.com/en/help/201]"
- Some users have used this workaround for Dropbox
Verify Site URL
Rainforest will add a trailing slash "/" when launching running the test. This will sometimes lead to an error that does not allow the test to direct to the correct URL which will fail the test. This can be avoided by adding a "#" to the end of your site url.
Our testers come from various IP address, secure environments will often block testers from reaching your site. Whitelisting Rainforest IP addresses may be required.