【发布时间】:2021-01-24 18:11:04
【问题描述】:
我使用时间分析器工具对 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();
}
}
【问题讨论】:
标签: java performance-testing appium-ios