Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement: xcresult test result parsing speedup #223

Merged
merged 5 commits into from
May 12, 2022

Conversation

priitlatt
Copy link
Contributor

@priitlatt priitlatt commented May 11, 2022

In case Xcode project has a lot of tests, then parsing test result information from generated xcresult bundle can become relatively slow. This is because underlying conversion command

xcrun xcresulttool get --format json --path '/path/to/TestSuite.xcresult' --id '...'

to transform binary test results included in the bundle to JSON format can generate a lot of output (30+ MB at 500K+ lines).

Evidently processing this kind of text output in Python via small (8KB) chunks is not the most efficient way to deal with it. As the output is only needed as a whole once the command is completed, then it makes sense to pipe it directly to a file, and finally read the generated JSON from this file once processing is completed.

Updated actions

  • xcode-project run-tests
  • xcode-project junit-test-results
  • xcode-project test-summary

@priitlatt priitlatt self-assigned this May 11, 2022
@priitlatt priitlatt added the enhancement New feature or request label May 11, 2022
@priitlatt priitlatt marked this pull request as ready for review May 11, 2022 15:26
@priitlatt priitlatt merged commit 6026f3d into master May 12, 2022
@priitlatt priitlatt deleted the improvement/xcresult-parsing-speedup branch May 12, 2022 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants