ChargePoint / xcparse

Command line tool & Swift framework for parsing Xcode 11+ xcresult
MIT License
392 stars 47 forks source link

[FeatureRequest] Support new HEIC format of screenshots #45

Closed stherold closed 4 years ago

stherold commented 4 years ago

Xcode 12 will generate HEIC images where possible:

Screenshots taken during UI tests are now encoded as HEIC files instead of JPEGs where possible. This can considerably reduce the file size of result bundles. (58468642)

I thought it would be a good idea to point you on this since it might be relevant somehown.

abotkin-cpi commented 4 years ago

Thanks for the ticket! I'll take a look this evening with the beta. xcparse should be using the extract command with the xcresulttool so "xcparse attachments" should always work regardless of file type. For the screenshots command, we use a Uniform Type Identifier filter of "public.image" so as long as HEIF's UTI type is returned by UTTypeConformsTo as conforming to "public.image", it should just work.

I should add an explicit xcresult from Xcode 12 & have a test that proves the HEIC gets exported correctly as part of this ticket.

abotkin-cpi commented 4 years ago

Update on this, got a branch up where I've added a unit test to double-check the UTI conformance & confirmed HEIC/HEIF will both conform to "public.image" that the screenshot command uses to filter, so both "screenshots" & "attachments" commands should just work without an update. Haven't been able to create an xcresult that has an HEIC attachment; will play around a bit more but if anyone has an example, let me know.

stherold commented 4 years ago

Nice thanks for being so quick on that topic 👍

abotkin-cpi commented 4 years ago

Closing this as added a test that shows UTI conformance at work & an .xcresult that outputs HEIC from screenshots & attachments commands (key was to turn on localization screenshots in a test plan).

Blackjacx commented 3 years ago

Our screenshot ZIP now becomes really big. So generating HEIC files comes in handy. Could you please describe in more detail how you managed to get those HEIC representations in the result bundle? Maybe with a screenshot of your testplan?