Failed to run Calabash tests on iOS device for Xamarin app

We cannot get Calabash tests to run a Xamarin app deployed on a real iPhone. We tried to load the sample application from:

http://developer.xamarin.com/guides/testcloud/calabash/introduction-to-calabash/

It works when deployed in a simulator, but not when trying a real device. We can install and run on a device, we just don't get it to work with Calabash.

The command with which we tried to run it:

APP_BUNDLE_PATH=~/Path/to/CreditCardValidation-Calabash/CreditCardValidation.iOS/bin/iPhone/Debug/CreditCardValidationiOS-1.0.ipa DEBUG=1 BUNDLE_ID=com.xamarin.calabash.example.creditcardvalidation DEVICE_TARGET=uuid-of-device DEVICE_ENDPOINT=http://ip.of.phone:37265 RESET_BETWEEN_SCENARIOS=1 cucumber

      

Output above:

Using the iOS profile...

Feature: Navigation feature


  @ios_only

  Scenario: A user can navigate between each journey stage # features/navigation.feature:4


INFO: Using uia strategy: 'preferences'

Preparation took 0.087536 seconds

{

                        :app => "<snip>",

                       :args => [],

    :bundle_dir_or_bundle_id => "<snip>",

                  :bundle_id => "<snip>",

                     :device => "<snip>",

              :device_target => "<device-uuid>",

              :launch_method => :instruments,

             :launch_retries => 5,

                   :log_file => "/var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00/run_loop.out",

                  :no_launch => false,

                    :no_stop => false,

                      :reset => true,

                :results_dir => "/var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00",

          :results_dir_trace => "/var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00/trace",

                     :script => "/var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00/_run_loop.js",

                :sdk_version => nil,

                       :udid => "<device-uuid>",

               :uia_strategy => :preferences,

                      :xcode => "6.0.1",

                 :xcode_path => "/Applications/Xcode.app/Contents/Developer"

}


### Starting on <device-uuid> App: <snip> ###

2014-11-07 11:21:38 +0000 xcrun instruments -w "<device-uuid>" -D "/var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00/trace" -t "Automation" "<snip>" -e UIARESULTSPATH /var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00 -e UIASCRIPT /var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00/_run_loop.js &> /var/folders/w1/55hzwq792vqdrv8bgw69yvy40000gp/T/run_loop20141107-1711-1whcn00/run_loop.out

Failed to launch.

execution expired: execution expired

Running `curl http://ip.of.phone:37265/version` returns the expected json.

      

+3


source to share


1 answer


You can check the following:

  • Connect your device via USB.
  • Make sure the bundle ID matches the App Bundle ID.
  • Does the device appear on the way out xcrun instruments -s devices

    ? If you don't check the Xcode Device window (Command + Shift + 2). Make sure the device is listed and displayed without warning. If it appears with errors, close Xcode, restart the device, restart Xcode. Rinse and repeat until errors are cleared. Someday I need to connect my device to another machine to clear the warnings.
  • Is the app installed on the device? Calabash cannot install applications on physical devices. See this project for a demonstration of how to use the ideviceinstaller to install an application on a device as part of Calabash testing. I added a TODO to improve the README.md for this project.


APP_BUNDLE_PATH = ~ / path / to / CreditCardValidation-hookah / CreditCardValidation.iOS / bin / iPhone / Debug / CreditCardValidationiOS-1.0.ipa

APP (preferred) and APP_BUNDLE_PATH environment variables are used only when targeting simulators. They are ignored when configuring physical devices.

0


source







All Articles