0

我目前正在调查为 iOS 运行 Calabash/Cucumber 测试,作为 Jenkins 构建工作的一部分。这个想法是它将针对应用程序支持的不同语言运行测试。

构建应用程序后初始化测试的代码是:

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}")

我遇到了这个项目(https://github.com/jonathanpenn/ui-screen-shooter),它运行一些自动化测试并以不同的语言启动应用程序,但看不到如何将其融入我的项目。

使用黄瓜时如何设置模拟器启动的语言?

4

2 回答 2

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).

于 2015-01-08T04:49:49.683 回答
0

它坏了,看看 youtube 上的 视频 Youtube 视频链接,用于更改葫芦 IOS 区域设置

更改 IOS 模拟器语言环境的步骤

  1. 找到具有正确 IOS 版本的模拟器的 IOS 模拟器文件夹
  2. 更新 data/Library/Preferences/.GlobalPreferences.plist 文件

在 Git Hub 上执行此操作的 Ruby 代码

于 2015-04-29T10:50:08.923 回答