4

I'm having trouble exporting screenshots using the 'export for localization' feature on Xcode 11. I'm currently working on creating XCUITest suites where I test a certain UI feature of an app, and I want to take screenshots of every page of the app as each test case pass.

I'm using xctestplan, and under Shared Settings->Configurations->UI Testing, I have

  • Automatic Screenshots = On
  • Localization Screenshots = On
  • Attachments = On, and keep all

However, after I run my tests, when I select Editor->Export for Localization, I can not select 'Include Screenshots'. Also, it gives me a yellow warning sign with text like "Screenshot for Localization Issue."

Also, after the tests pass, I can locate the images screenshot.png as attachments listed in the Report Navigator, as well as screenshots taken with title "Localization screenshot", but currently I have no way to export them unless I manually go through it one by one and save each file by right click.

I want to be able to export these screenshots and collect them on a designated directory folder without manually going through all of them to save each image.

I have tried: 1. clean build folder, delete logs in Derived data /users/'ID'/Developer/Xcode/DerivedData 2. run it under UItests scheme as well as the actual app scheme (the executable one) 3. delete all contents and settings on simulator, quit Xcode and restart Mac then restart Xcode

kask
  • 43
  • 2

1 Answers1

3

My workplace open sourced a tool called xcparse that allows you to export out the screenshots from the new xcresult format in Xcode 11 (https://github.com/ChargePoint/xcparse). You can install it Homebrew: brew install chargepoint/xcparse/xcparse

Nobosi
  • 1,066
  • 6
  • 14
  • thank you for your response, this works for me and now I can export screenshots that were added as attachments to the test cases. It would be great if I could even further skip the step of acquiring xcresult file, but still much appreciated! – kask Oct 17 '19 at 20:22