Bill L
Bill L

Reputation: 2826

Calabash can't connect to simulator

I'm trying to run some Calabash UI tests in my app but am running into trouble connecting to my simulator. I'm trying to just connect view the calabash-ios console, but am running into the following error:

 WARNING

Warning Trying to connect to simulator that was not launched by Calabash/instruments.
To fix this you must let Calabash or instruments launch the app.
Query will work, but gestures will not.

I've run the app view my -cal target and have successfully seen the message Started LPHTTP server on port 37265. Here's some more info on Calabash/my setup:

xcode-select --print-path
/Applications/Xcode.app/Contents/Developer

xcodebuild -version
Xcode 7.0
Build version 7A218

calabash-ios version
0.14.3

server_version
=> {"app_id"=>"com.solstice.discoverfinancialenterprise.mobile", "outcome"=>"SUCCESS", "server_port"=>37265, "version"=>"0.14.3", "app_name"=>"Discover", "system"=>"x86_64", "simulator_device"=>"iPhone", "simulator"=>"", "app_version"=>"1", "short_version_string"=>"6.6.1 UAT", "iphone_app_emulated_on_ipad"=>false, "app_base_sdk"=>"iphonesimulator9.0", "form_factor"=>"iphone 4in", "git"=>{"revision"=>"c2d009b", "remote_origin"=>"[email protected]:calabash/calabash-ios-server.git", "branch"=>"master"}, "screen_dimensions"=>{"sample"=>1, "height"=>1136, "width"=>640, "scale"=>2}, "4inch"=>true, "iOS_version"=>"8.4"}

Sorry the JSON isn't formatted, my console spat it out in an unformatted way.

I've used a few different simulators, iPhone 6, iOS 9 and iOS 8.3, and an iPhone 5s iOS 8.4. Does anyone know anything I need to do differently to get this to connect to my simulator?

Upvotes: 1

Views: 480

Answers (1)

jmoody
jmoody

Reputation: 2480

+100 for including all the information about your environment.

Please update to Calabash 0.16.4 which is compatible with your Xcode version.

I'm trying to just connect view the calabash-ios console, but am running into the following error:

Can you show how you launched console and what command you tried to run?

Typically, you want something like this:

$ APP=/path/to/Your.app calabash-ios console
> start_test_server_in_background

You must let calabash launch the app or you will not be able to perform gestures.

APP and APP_BUNDLE_PATH are synonymous.

http://calabashapi.xamarin.com/ios/file.ENVIRONMENT_VARIABLES.html#label-APP+and+APP_BUNDLE_PATH

Upvotes: 1

Related Questions