0

I am currently investigating running Calabash/Cucumber tests for iOS as part of a Jenkins build job. The idea is it will run the tests against the different languages the application supports.

The code to initialise the tests once the app has been built is:

system("SDK_VERSION=#{sdk_version} \
  DEVICE='#{ios_device}' \
  DEVICE_TARGET='#{device_name} (#{sdk_version} Simulator)' \
  APP_BUNDLE_PATH='#{app_path}' \
  CONNECT_TIMEOUT=#{connect_timeout} \
  RESET_BETWEEN_SCENARIOS=1 \
  SCREENSHOT_PATH='#{screenshotfolder}' \
  cucumber --format json -o Reporting/#{log_file} #{cucumber_tags}")

I have come across this project (https://github.com/jonathanpenn/ui-screen-shooter) which runs some automation testing and launches the app in different languages but can't see how I can fit that into my project.

How can I set the language the simulator launches in when using cucumber?

SamRowley
  • 3,435
  • 7
  • 48
  • 77

2 Answers2

0

You can change the locale with command "calabash-ios sim locale ".

Here is a sample copied from this https://groups.google.com/forum/#!msg/frank-discuss/o7JLlynTEsY/o9RtPhme7yUJ

calabash-ios sim locale 

lists available locales

calabash-ios sim locale da sv

sets simulator language to Danish and regional settings to Swedish

You have to do this before you start your app (i.e. before simulator launches).

Lasse
  • 1,153
  • 1
  • 10
  • 21
  • I have tried this but it does not seem to do anything. I have copied the .GlobalPreferences from an older version of Calabash which removes an error I was getting but then running this command (either before the calabash-ios console or as part of i.e. calabash-ios console sim locale fr) does nothing to change the langugae. I have also tried calling calabash-ios sim reset before both of these with no result. – SamRowley Jan 08 '15 at 09:22
0

Its broken,Take a look at the video on youtube Youtube video link for changing calabash IOS locale

Steps to change IOS simulator locale

  1. Locate IOS simulator folder of the simulator with correct IOS version
  2. update data/Library/Preferences/.GlobalPreferences.plist file

Ruby code to do that on Git Hub

Tejasvi Manmatha
  • 564
  • 7
  • 12