Appium iOS: The network trace file for instruments gets blank
See original GitHub issueThe problem I am running appium for ios real device to record the instruments trace log for network. But after running the test, i found the .trace file is blank. If i am running it for “Activity Monitor”, the .trace file have the contents.
Environment
- Appium version: 1.14.0 (Appium desktop for mac)
- ios real device: 12.4
- Instrument version: 10.2.1 (10E1001)
- ios network connection: wifi
The sample code:
File traceZip = new File("/tmp/trace.zip");
HashMap<String, Object> args = new HashMap<>();
args.put("timeout", 60000);
args.put("pid", "current");
args.put("profileName", "Network");
//args.put("profileName", "Activity Monitor");
driver.executeScript("mobile: startPerfRecord", args);
driver.findElementByAccessibilityId("Search").click();
Thread.sleep(5000);
String b64Zip = (String)driver.executeScript("mobile: stopPerfRecord", args);
byte[] bytesZip = Base64.getMimeDecoder().decode(b64Zip);
FileOutputStream stream = new FileOutputStream(traceZip);
stream.write(bytesZip);
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top Results From Across the Web
[Appium - iOS] The .trace file gets blank after running a test ...
I'm using Xcode Instruments (Activity Monitor template) along with appium in order to get CPU and Memory usages. When running a the test ......
Read more >Troubleshooting - Appium
Make sure the app is compiled for the simulator (or real device) as appropriate (e.g., in debug mode for the simulator), or you...
Read more >UIAutomation (iOS) - Appium
Testing on iOS generates files that can sometimes get large. These include logs, temporary files, and derived data from Xcode runs.
Read more >XCUITest (iOS) - Appium
Appium's primary support for automating iOS apps is via the XCUITest driver. ... Testing on iOS generates files that can sometimes get large....
Read more >Mac : Issue with Appium-Instruments trace file - Support
I am trying to get battery usage/memory/CPU usage related trace file using appium-intruments. Below is the command that gets executed while ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
yes, it works fine with the full path name now.
args.put("profileName", "/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/Resources/templates/NetWork");
thank you!What if you provide the full path to the network template instead of just the name