使用“快速通道扫描”测试iOS应用程序时,我无法获得超过2个并发模拟器测试设备。
仅使用xcodebuild可以“手动”执行此操作,就像这样。最多可以启动4个设备:
xcodebuild -workspace myapp.xcworkspace -scheme somescheme_debug -destination 'platform=iOS Simulator,OS=12.1,name=iPhone X' build test CODE_SIGN_IDENTITY="" CODE_SIGNING_REQUIRED=NO -parallel-testing-worker-count 4
相关(但已关闭(忽略(忽略)?))线程:https://github.com/fastlane/fastlane/issues/13394
这是我正在使用的车道
platform :ios do
desc "Test"
lane :test do |values|
maxconcurrenttestingcount = 4
schemefortesting = 'somescheme_debug'
thebranch = git_branch
ensure_git_status_clean
puts "Testing, using scheme: '#{schemefortesting}'"
scan(
scheme: schemefortesting,
devices: ['iPhone X'],
# devices: ['iPhone XS Max'], #, 'iPad Air'],
max_concurrent_simulators: maxconcurrenttestingcount,
xcargs: "-parallel-testing-enabled=YES -parallel-testing-worker-count=#{maxconcurrenttestingcount}" # hmm not really working?
)
reset_git_repo
end
end
答案 0 :(得分:0)
从fastlane 2.142开始,您现在可以指定concurrent_workers
指定在并行测试期间将产生的测试运行程序的确切数量。
相当于
-parallel-testing-worker-count
scan(
concurrent_workers: 2
)