问题描述
我使用时间分析器工具通过ios应用启动了性能测试
取回乐器trace.zip
文件后
run.zip
中的跟踪文件无法打开
有人可能曾经遇到过这个问题
我的代码
public void testAppActivity() throws Exception {
try {
HashMap<String,Object> args = new HashMap<>();
args.put("timeout",60000);
args.put("pid","current");
args.put("profileName","Time Profiler");
driver.executeScript("mobile: startPerfRecord",args);
testchannelnumbers(driver);
OpenChannelDeviceOne(driver);
PTT(driver);
args = new HashMap<>();
args.put("profileName","Time Profiler");
String b64Zip = (String)driver.executeScript("mobile: stopPerfRecord",args);
byte[] bytesZip = Base64.getMimeDecoder().decode(b64Zip);
FileOutputStream stream = new FileOutputStream(traceZip);
stream.write(bytesZip);
stream.close();
} finally {
driver.quit();
}
}
解决方法
好,这是与提取zip有关的appium错误
解决方法:
只需将解压缩的内容提取到一个文件夹中,然后将该文件夹重命名为“