此外,爲@ Vaasu的回答,如果系統投裝置歧義的錯誤,你可以給設備ID代替設備模型。
例如:在我的系統中,這些是可用的設備。
Resizable iPad (8.0 Simulator) [97067B56-428E-48DE-A35E-87442AE0B2F7]
Resizable iPhone (8.0 Simulator) [A50156D2-F5B9-4781-99FC-F7D2D64C8C78]
iPad 2 (7.1 Simulator) [C298E193-48FD-451C-9173-A2B70A4B6232]
iPad 2 (7.1 Simulator) [2A03A43F-3F4F-453A-9469-E2F84598FE2D]
iPad 2 (8.0 Simulator) [95E5D9E5-6EA7-47DB-AC9D-40880CD78F98]
iPad 2 (8.0 Simulator) [F51C4654-76C8-4B33-A283-8A9B21FF403A]
iPad Air (7.1 Simulator) [0682AD59-0991-4E41-9636-F4450BC4DABC]
iPad Air (8.0 Simulator) [B5748FCD-FE67-46EE-BD4A-C1BE0FA160A7]
iPad Retina (7.1 Simulator) [E2D7C775-F0EC-4AE7-82CD-EAA8E2EE8E25]
iPad Retina (8.0 Simulator) [9C1576B3-58E4-412A-8574-64E60D43E4D0]
iPhone 4s (7.1 Simulator) [6E94CA56-62EC-45BF-AD01-5166FACC75EB]
iPhone 4s (8.0 Simulator) [39E3AD04-62B4-4D10-A60B-D48204785508]
iPhone 5 (7.1 Simulator) [EB5E3DEA-5D12-46B1-A18D-21B06F3FAC26]
iPhone 5 (8.0 Simulator) [0692F6C0-57ED-43EA-9599-A49F3BA86435]
iPhone 5s (7.1 Simulator) [EBB1E555-47B6-410A-98AF-1145728590E3]
iPhone 5s (8.0 Simulator) [26639A3B-F979-4BFD-920D-A6AB9E92D0AB]
iPhone 6 (8.0 Simulator) [22797884-9582-4813-AEFF-9155C0DCCCE6]
iPhone 6 Plus (8.0 Simulator) [DE881BB5-434C-4F38-8BF8-D199BEF57919]
爲此,您可以通過這種方式運行腳本。
$instruments\
-w "C298E193-48FD-451C-9173-A2B70A4B6232" \
-t $TRACETEMPLATE AppLocation \
-e UIASCRIPT Script.js \
-e UIARESULTSPATH reportPath