XCResultKit icon indicating copy to clipboard operation
XCResultKit copied to clipboard

Update ActionTestFailureSummary for Xcode 14 and introduce Sourcery

Open tylervick opened this issue 3 years ago • 3 comments

Background: xcresulttool 3.39 removed com.apple.dt.xctest.activity-type.testAssertionFailure from ActionTestSummary, meaning we're now more reliant on ActionTestFailureSummary to provide failure details.

Changes:

  • Update ActionTestFailureSummary to include:
    • uuid
    • issueType
    • detailedDescription
    • attachments
    • sourceCodeContext
    • timestamp
    • isTopLevelFailure
  • Introduce Sourcery to automatically generate initializers
  • Create XCResultObjectGenerated protocol to generate XCResultObject conformance

Test:

  • Verify no regression to xcresult parsing for successful runs
  • Verify ActionTestFailureSummary is populated with all available failure data

tylervick avatar Sep 19 '22 22:09 tylervick

@tylervick Thanks for the PR! Check out #42 also as I added all the latest objects & fields that Xcode 14 is using. That does have the changes to ActionTestFailureSummary added.

I'm almost thinking what we should do is create a release with all the new fields (possibly from #42), then move the Sourcery changes as a separate bit of work so we can have time to refine that implementation. And chat more about using Sourcery long term. But open to other ideas.

davidahouse avatar Sep 20 '22 00:09 davidahouse

Hey @davidahouse thanks for the quick review! I agree with this rollout plan - there's also potential to generate the base objects as well after parsing the output from xcresulttool.

Let me know if I can be of any help with the WIP PR - thanks again!

tylervick avatar Sep 20 '22 04:09 tylervick

@tylervick I've merged in the update for Xcode 14 and cut a new release v1.0.0. I think next step I'd like to take a stab at generating the models from the schema export from xcresulttool (as you mentioned above). I think we can have just a simple standalone app that can generate this. Need to decide if it belongs in this repo, or a separate one however. 🤔

davidahouse avatar Oct 14 '22 15:10 davidahouse