2

In Jenkins I am passing the following to the shell:

DEVICE_TARGET='iPhone 6 (8.1 Simulator)'
cucumber features/Login_FR.feature

However the cucumber script keeps launching device iPhone 5 (8.1 Simulator).

When I run DEVICE_TARGET='iPhone 6 (8.1 Simulator)' from the terminal all works as expected.

I've blown away the derived data, cleaned and rebuilt from Xcode and reset the simulator. That did not seem to cure the problem. Is there something cached in the Jenkins job that keeps telling the script to run iPhone 5 (8.1 Simulator)?

Is there another way to define what device is to be launched from either the pre_stop_hooks or the launch.rb?

alannichols
  • 1,496
  • 1
  • 10
  • 20
Laser Hawk
  • 1,988
  • 2
  • 23
  • 29
  • I may have figured it out, but we'll see it could return. I never built iPhone 5 (8.1 Simulator) in Xcode and for an unknown reason cucumber was defaulting to that sim version and ignoring my DEVICE_TARGET variable. However when i finally built it in the one it was defaulting to it then start using the DEVICE_TARGET I specified. GO figure : / – Laser Hawk Dec 17 '14 at 00:36
  • Can you clarify how you called cucumber? From your code block, I see 2 lines. Was the entire command on the same line? If not, I don't think DEVICE_TARGET was being defined correctly for the cucumber command. You'd have to use `export DEVICE_TARGET=` to get the correct behavior. I am glad you got it this running, but building for the correct simulator in Xcode has nothing to do with which Simulator is launched by Calabash. Have a look at this wiki page: https://github.com/calabash/calabash-ios/wiki/Hot-Topics. Gist: https://gist.github.com/jmoody/7543629290b7e192a261 – jmoody Dec 17 '14 at 15:55
  • yes it was on the same line. I figured that problem out later. thanks for the link. – Laser Hawk Dec 17 '14 at 17:53

1 Answers1

1

try this:

DEVICE_TARGET='iPad 2 (8.1 Simulator)' cucumber

replace the value given to device_target with whatever simulator that you need to use.

s5v
  • 495
  • 5
  • 20
  • run that at the terminal- and you can also add an alias -ipad_cucumber runs the above command for me. – s5v Mar 23 '15 at 07:59