【问题标题】:trace.zip file content cannot be opened in instrument无法在仪器中打开 trace.zip 文件内容
【发布时间】: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


    【解决方案1】:

    好的,这是与提取 zip 相关的 appium 错误 一种解决方法: 只需将解压后的内容提取到一个文件夹中,然后将该文件夹重命名为“.trace”。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-04-23
      • 1970-01-01
      • 1970-01-01
      • 2017-02-07
      • 2011-03-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多