现在我正在跑步:
fastlane scan --scheme MyUITests --destination 'platform=iOS,id=myId' --destination 'platform=iOS,id=myId2' --output_types "junit" --output_files "report.xml" --clean
这将在第二台设备(myId2)上运行测试,而不在第一台设备上运行。如果我切换顺序,则(myId)将运行,而(myId2)将不会运行。因此,它需要最后一个目标。我想知道如何在多个连接的设备上运行测试。
当我尝试使用快速文件时:
lane :uitests do
scan(devices: ["asd's iPhone", "asd's iPad"],
scheme: "MyUITests",
output_types: "junit",
output_files: "report.xml",
clean: true)
end
它不能识别名字。我尝试了uuid,但是它们也没有用。我收到以下错误:
[13:08:40]: Ignoring 'blah's iPhone', couldn’t find matching simulator
[13:08:40]: Ignoring 'asg's iPad', couldn’t find matching simulator
[13:08:40]: Couldn't find any matching simulators for '["blah's iPhone", "asg's iPad"]' - falling back to default simulator
[13:08:40]: Found simulator "iPhone 5s (11.4)"
那么我如何一次在多个连接的设备上进行测试?
我不想使用模拟器,因为我需要在蜂窝电话上进行测试并执行其他只能通过物理设备完成的操作。我尝试了xcodebuild,但是它没有生成junit xml报告,我现在需要jenkins的报告,而fastlane现在正在为一台设备进行报告。
答案 0 :(得分:1)
我已经在物理设备上成功运行扫描。您可以将destination和platform和id一起使用,以指定iOS平台和id的设备UDID
即-destination'platform = iOS,id = UDUD',其中UDID是有效的设备UDID