Closed daryl0313 closed 2 years ago
Sounds like it could be related to this: https://github.com/coverlet-coverage/coverlet/issues/794#issuecomment-612067552
No. As the coverage is not being collected by coverlet.
I believe that the problem is due to the version of ReportGenerator that FCC is currently using.
I am working on a feature branch https://github.com/tonyhallett/FineCodeCoverage/tree/webview2-reportgenerator-api that uses ReportGenerator 5.1.4 as a nuget reference compared to current that uses reportgenerator.exe 4.7.1. The feature branch does not have the issue.
If you look in ...FCCAsyncTestIssue-master\FCCAsyncTestIssue-master\CoreLibrary.Tests\bin\Debug\net6.0\fine-code-coverage\coverage-tool-output
there is a Cobertura.xml file that ReportGenerator has generated from the ms cobertura.xml. You can see that the ms one is correct and the ReportGenerator one is not.
This will be rectified once I complete and push the feature.
If you need the fix now I can send you a vsix of the feature build but note the following:
It relies upon WebView2. That you have the Evergreen Runtime installed https://docs.microsoft.com/en-us/microsoft-edge/webview2/concepts/distribution#the-evergreen-runtime-distribution-mode ( When I finished the feature FCC will install it for you if necessary )
The report is not currently reflecting visual studio theming / environment fonts.
The report does not currently have sticky tables.
I'm not sure it's related to this issue but I got my async methods to be covered by changing the setting Tools > Options > Fine Code Coverage > AdjacentBuildOutput to true.
Thanks Jeremy Thompson.
@JayOwl Are you using coverlet
or Microsoft.CodeCoverage
? I think that workaround doesn't work for Microsoft.CodeCoverage
@tonyhallett Any chance to get a release with new feature? Or at least a prerelease to test π
@viceice
I think that workaround doesn't work for Microsoft.CodeCoverage Agreed
The new feature now has the necessary code for the WebView2 runtime so what remains is the styling of the react report. I should be able to complete this in the next two weeks.
Sorry for noise. π€ Any news? It's pretty anoying to not see async function coverage. π
Has been fixed https://github.com/FortuneN/FineCodeCoverage/commit/1f040cb5de9cad8942a42f1ac6ac1f4eb79681b6 but..........
@FortuneN Your publisher access token has expired https://github.com/FortuneN/FineCodeCoverage/runs/8041220586?check_suite_focus=true
The new release is not my new feature of WebView2 + React report. This I will finish when I return from holiday.
To have ms coverage async methods working we cannot just update to the latest report generator version that fixed https://github.com/danielpalme/ReportGenerator/issues/467 as an earlier commit removed ie and hence WebBrowser control support - https://github.com/danielpalme/ReportGenerator/commit/f801790d80ebf76030476217848e98d05c8075b7
So I have forked the repo at 4.7.1 and added the single line of code that fixes async. This code is https://github.com/FortuneN/FineCodeCoverage/blob/master/Shared%20Files/ZippedTools/reportGenerator.4.7.2.zip and https://github.com/FortuneN/FineCodeCoverage/blob/master/Shared%20Files/ZippedTools/ReportGenerator.Core.dll
So please update your access token !
Although the vsix marketplace release github action did not occur, the release action did.
https://github.com/FortuneN/FineCodeCoverage/releases/tag/v1.1.181
So you can use https://github.com/FortuneN/FineCodeCoverage/releases/download/v1.1.181/FineCodeCoverage2022.vsix https://github.com/FortuneN/FineCodeCoverage/releases/download/v1.1.181/FineCodeCoverage.vsix
will test it on Monday β€οΈ
Publish was skipped, so still missing on store
@FortuneN
https://github.com/FortuneN/FineCodeCoverage/runs/8188031339?check_suite_focus=true
add to marketplace
VSSDK: error VsixPub0031 : An error occurred while attempting to authenticate: VS30063: You are not authorized to access https://marketplace.visualstudio.com./
Once rectified the workflow cannot be re-run but needs to be triggered. Let me know when ready. Thanks
https://github.com/FortuneN/FineCodeCoverage/releases/download/v1.1.184/FineCodeCoverage.vsix https://github.com/FortuneN/FineCodeCoverage/releases/download/v1.1.184/FineCodeCoverage2022.vsix
This release fixes generic classes with ms code coverage.
https://github.com/FortuneN/FineCodeCoverage/releases/download/v1.1.184/FineCodeCoverage.vsix https://github.com/FortuneN/FineCodeCoverage/releases/download/v1.1.184/FineCodeCoverage2022.vsix
This release fixes generic classes with ms code coverage.
If I'm not mistaken then, this release also includes fixing async methods, correct? It appears to be working for me now
@kakins correct
@FortuneN It's still not publishing to the store π
I've updated the token. The only issue on my run is the version which i'm sure is a nothing-burger; right @tonyhallett ? https://github.com/FortuneN/FineCodeCoverage/actions/runs/3023299512/jobs/4904846997
@FortuneN You cannot use workflow_dispatch. It needs to be triggered by pull request merge. I do one shortly.
At a later date can look at the actions further.
@FortuneN Still getting the access token issue https://github.com/FortuneN/FineCodeCoverage/actions/runs/3045484608/jobs/4907101471
Error: Error: Command failed: VsixPublisher.exe publish -payload D:\a\FineCodeCoverage\FineCodeCoverage\FineCodeCoverage\bin\Release\FineCodeCoverage.vsix -publishManifest D:\a\FineCodeCoverage\FineCodeCoverage\vs-market-place-manifest.json -personalAccessToken *** VSSDK: error VsixPub0031 : An error occurred while attempting to authenticate: VS30063: You are not authorized to access https://marketplace.visualstudio.com./
Publish seems to be resolved.
Not sure about that last 'comment' bit
https://github.com/FortuneN/FineCodeCoverage/actions/runs/3077073438/jobs/4971676090
Thanks. I will kick off the process again. At a later date the workflows can be revisited to support manual triggers.
On Tue, 13 Sept 2022 at 12:04, Fortune Ngwenya @.***> wrote:
[image: image] https://user-images.githubusercontent.com/5636175/189885287-e5e38417-6106-4831-b8e7-14d3a60ac213.png
I updated the token
β Reply to this email directly, view it on GitHub https://github.com/FortuneN/FineCodeCoverage/issues/270#issuecomment-1245250766, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACWFCRUZEHNEEFNRZZ5JE3LV6BNUNANCNFSM5Y36PSMQ . You are receiving this because you were mentioned.Message ID: @.***>
Installed product versions
Description
Getting no coverage results for
async
methods withRunMsCodeCoverage
set toYes
.Steps to recreate
I created a simple solution that reproduces the issue for Framework and dotnet core project versions.
RunMsCodeCoverage
is set toYes
Current behavior
Only seeing coverage for synchronous methods in the coverage report and in the gutter in the editor. Seeing 3 covered lines for each test project in the report.
Expected behavior
See coverage for all methods in the coverage report and in the gutter in the editor. Should see 6 covered lines for each test project in the report.
Side Notes
ExcludeByAttribute
cleared out, I get the same result.Coverage Log
FCC Output