There are several options for setting up your mobile application for testing with Rainforest.

Setting Up Android Builds

  • Compile and export your application for testing.
    Make sure the android .apk is compiled for x86, not ARM

Setting Up iOS Builds

To run tests on an iOS VM, follow these steps to set up your app as a .app file:

Generate a simulator build using the xcodebuild command
Make sure xcode Command Line tools are installed. They come bundled with xcode.

To build simulator builds you need to build your app for x86 64-bit. The command you will run to make the build should look similar to this:

xcodebuild ENABLE_BITCODE=NO -workspace
'/path/to/YourWorkspace.xcworkspace' -scheme 'myScheme' -arch x86_64 -sdk
iphonesimulator

  • ENABLE_BITCODE=NO turns off bitcode for the build.
  • -workspace takes your .xcworkspace file
  • -scheme is the build scheme. You may instead need to use -project myproject.xcodeproj or -target myTarget, depending on your setup.
  • -arch x86_64 sets the build to be 64-bit which will let it run on simulators. If you need to build 32-bit use -arch i386. Apple deprecated 32-bit support in iOS 11 so most builds should be 64-bit now. Your app MUST be built with one of these to run on simulators.
  • -sdk iphonesimulator sets the sdk to simulator. If you want a specific sdk you can list your installed sdks with xcodebuild -showsdks and change the option to be explicit: -sdk iphonesimulator11.1
  • Depending on your setup you may need to use the option -configuration "Debug" or -configuration "Release"
  • If you need more help with xcodebuild check out Apple's documentation here and here.
  • IMPORTANT: Test that your .app works on a local iOS simulator by dragging and dropping the .app file onto your local xcode simulator. If it does not work on your local iOS simulator, it won't work on ours.
  • IMPORTANT: Zip the .app file produced by the command. Rainforest supports .zip, .tar and .gz

After setting up your applications for testing, we have a few options for you to upload your application to Rainforest for testing.

Option 1: Upload your mobile app via the CLI

Rainforest allows a direct mobile app upload via the command line interface so your app can be ready for testing.

To upload your mobile app via the CLI, install the Rainforest command-line interface. See the guide on Installing the Rainforest CLI.

Once set up, use the following command to view your list of environments.

rainforest environments --token YOUR_TOKEN

Next, use the following command to view your list of sites.

rainforest sites --token YOUR_TOKEN

Both sites and environments can be added and edited through the Settings page on our platform. Select the relevant site ID and environment ID and use in the following command while uploading your app.

rainforest mobile-upload --token YOUR_TOKEN --site-id 1234 --environment-id 5678 my_app.apk

All apps are stored securely in a non-public location.

Go back to the Settings page to view your newly uploaded app. Then, start your first test on this new app.

Option 2: Upload your mobile app in-app

Rainforest allows direct mobile app upload in the Sites and Environments settings in the Settings section of the Rainforest app.

  1. Navigate to Settings (gear icon) on the left panel then click into the Sites.
  2. Click Apps and then click (+) New Mobile Site to add a new mobile application.
  3. Give the app a unique name.
  4. Select the appropriate App Type and enter any URL, then click Done.
  5. Click the pencil icon of the app that was added then click the Upload button to upload the app.

Option 3a:
Setting up your Android application file for testing with a direct download link

Using a direct download link can be used as an alternative to uploading directly via the CLI or in-app.

  1. Compile and export your application for testing.
  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
  3. Set up your app for testing. Go to Settings > Sites.
    Under Apps, click (+) New Mobile Site, set Type to Android VM.
    Add the URL for your Android direct download.

Rainforest will automatically download and install your native Android application on our VMs from this URL when you create and run a mobile test.

Option 3b:
Setting up your iOS application file for testing with a direct download link

Using a direct download link can be used as an alternative to uploading directly via the CLI or in-app.

  1. Generate a simulator build using the xcodebuild command (see above for iOS build requirements).
  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 .app file.
  • Do not use links that redirect, require credentials, or limit access; the link should lead to a direct download.

3. Set up your app for testing.
Enter the link to your iOS .app file under ‘Apps’ in your site settings
Set the device 'Type' to ‘iOS VM’

Did this answer your question?