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
First of all Thanks so much for Branch(C1) and Condition(C2) coverage implementation. It helps us a lot.
I have to find C1 for whole project. So I planned to pass packages one by one to get whole coverage. In this case:
Is the package coverage rate (C1) that can be measured by gobco limited to the portion of the test code in the same package that passes?
For example, if there are packages A and B, and a function in package A is only tested within package B, will the test coverage of package A be 0%?
The text was updated successfully, but these errors were encountered:
Hi @visu-suganya, gobco is currently limited to checking the coverage of a single directory, using only the tests from that same directory.
I didn't implement the multi-directory coverage because I didn't want to duplicate all the logic of scanning for nested go packages in a directory, see #12.
If you know how the magic argument ./... is interpreted exactly or would like to try it out, feel free to hack gobco. The basic idea is:
instrument each given directory
run all the tests at once, for all the directories
merge the coverage results from all directories
Here are a few entry points:
gobco.parseArgs panics right now but is already prepared for accepting multiple directories.
gobco.runGoTest currently runs go test on each directory separately. I don't remember why.
Gobco can already merge several coverage result files, see gobco_fixed.go, look for GOBCO_STATS.
So it may be as simple as connecting all these parts. I didn't badly need this feature up to now, that's why I didn't implement it.
Hi @rillig
First of all Thanks so much for Branch(C1) and Condition(C2) coverage implementation. It helps us a lot.
I have to find C1 for whole project. So I planned to pass packages one by one to get whole coverage.
In this case:
Is the package coverage rate (C1) that can be measured by gobco limited to the portion of the test code in the same package that passes?
For example, if there are packages A and B, and a function in package A is only tested within package B, will the test coverage of package A be 0%?
The text was updated successfully, but these errors were encountered: