You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 15, 2023. It is now read-only.
I'm manually porting an existing large/complex codebase to Go and am using failed test cases to work out where there is a mismatch in implementation. In doing so, it helps to look at the code path of a failed test.
As the codebase is large, it helps to use the code coverage feature to limit the manual visual diff when failures occur.
Unfortunately, however, vscode-go does not show code coverage when the test fails, despite Go producing the coverprofile file. A workaround is to force tests to pass by removing test assertions, but this is time-consuming. This took me an hour to work out: I was especially puzzled as to why no code coverage was shown, despite the GOPATH looking OK and the coverprofile file being generated OK.
Can we include failed tests into the code coverage?
The text was updated successfully, but these errors were encountered:
I'm manually porting an existing large/complex codebase to Go and am using failed test cases to work out where there is a mismatch in implementation. In doing so, it helps to look at the code path of a failed test.
As the codebase is large, it helps to use the code coverage feature to limit the manual visual diff when failures occur.
Unfortunately, however, vscode-go does not show code coverage when the test fails, despite Go producing the coverprofile file. A workaround is to force tests to pass by removing test assertions, but this is time-consuming. This took me an hour to work out: I was especially puzzled as to why no code coverage was shown, despite the GOPATH looking OK and the coverprofile file being generated OK.
Can we include failed tests into the code coverage?
The text was updated successfully, but these errors were encountered: