Search code examples
androidcalabashcalabash-android

Calabash - start_test_server_in_background not launching app


These are the steps I followed -

>Calabash-android console file.apk
irb(main):003:0>reinstall_apps
irb(main):004:0>start_test_server_in_background
nil

There is no error but my app is not launching. All I can see is a black screen like app is about to launch but its not. I tried replicating it on another test project but its working fine.


Solution

  • If you are using any custom activity, use environment variable MAIN_ACTIVITY while using run command.

    calabash-android console file.apk MAIN_ACTIVITY="com.example.youractivity"
    

    For more information: http://calabashapi.xamarin.com/android/file.ENVIRONMENT_VARIABLES.html#MAIN_ACTIVITY