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

Code coverage report is not showing up #128

Open
denil-ct opened this issue Jan 20, 2022 · 15 comments
Open

Code coverage report is not showing up #128

denil-ct opened this issue Jan 20, 2022 · 15 comments

Comments

@denil-ct
Copy link

I had 255 test cases and 77 cases failed
I had these errors, is it because of that?

Error: The 'summary' will be truncated because the character limit (65535) exceeded.
Error: The 'text' will be truncated because the character limit (65535) exceeded.
Error: Annotations that exceed the limit (50) will be truncated.
@kishikawakatsumi
Copy link
Owner

No, that message is irrelevant. That message simply informs you that the report was partially truncated because it exceeded the internal limits of the GitHub Checks API. Strictly speaking, it is a warning message, not an error.

I think the reason why the code coverage is not shown is that the XCResult bundle does not contain coverage. Can you confirm that the test bundle contains the coverage data? Or can you share the test bundle for me to investigate the problem?

@denil-ct
Copy link
Author

It does contain it

When I run xcrun xccov view --report --json Example.xcresult I get a json result of code coverage in the terminal

@denil-ct
Copy link
Author

It seems the report generated is cut off
I believe when I run massive amounts of test cases only part of them show up in the final detailed output
It shows up in the table but gets truncated in the details view
As you can see after a certain number of test classes it comes like this and then moves to annotations

image

@kishikawakatsumi
Copy link
Owner

Oh, that's probably why. GitHub Checks has a character limit, and I think it exceeded that limit just by reporting lots of test failures. That's probably why the test coverage was truncated.

@denil-ct
Copy link
Author

I see, Is there any workaround for this?
Like can we disable annotations/detailed view and get code coverage instead?

@kishikawakatsumi
Copy link
Owner

If you set the show-passed-tests: false parameter, only failed tests will be reported, so the display will be slightly increased.

However, the case where so many tests are failing is currently outside the scope of the use case. What kind of behavior are you expecting? Do you only want to see the test coverage?

@denil-ct
Copy link
Author

Yes tried with that flag, it improved a little bit, but still not covered all test classes and got cut off in details view
Yes an option to disable details section or the annotations section so there is enough space for code coverage results.
Ideally we can customize what sections need to be displayed in the end result.

@kishikawakatsumi
Copy link
Owner

I see. Thanks.

Ideally we can customize what sections need to be displayed in the end result.

Yes, I agreed with you. I plan to do that eventually, but it will take some time because I need to rewrite parsing xcresult into a flexible code.

@denil-ct
Copy link
Author

Cool, Thanks for the tool
I will try some workarounds for now

@tonyarnold
Copy link

I'm seeing the same issue as the OP. Same error, but no other info:

CleanShot 2022-02-08 at 09 51 56@2x

@denil-ct
Copy link
Author

denil-ct commented Feb 8, 2022

@tonyarnold do you mean you are not getting the test results at all or is it like me just cut off in the middle?

@tonyarnold
Copy link

My results did show up (although I misunderstood that it overwrites the results if you try to capture more than one xcresult bundle), however they were truncated like yours @denil-ct.

@Dharna
Copy link

Dharna commented Mar 16, 2023

Is there anyway the tool can generate an output file that we can upload as an artifact to get around the git word limit?

@denil-ct
Copy link
Author

@Dharna We decided to go with this tool as it gave a file output that we could then ingest into our systems. This allowed us to overcome the truncation issue. Although, one thing to note is, that tool was not designed for Xcode or iOS development in general, more oriented towards windows, so you might need to install a couple of dependencies as needed.

@Dharna
Copy link

Dharna commented Mar 16, 2023

@denil-ct I see. Yeah I am mainly looking for iOS and macOS report generation. Thank you for the tool! Will take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants