ENH: Improve itk::ResampleImageFilter class coverage.#461
Conversation
|
And hopefully get another file with 100% code coverage. |
Improve `itk::ResampleImageFilter` class coverage. Specifically, call and check the `GetExtrapolator()` and `GetOutputDirection()` methods: http://testing.cdash.org/viewCoverageFile.php?buildid=5730024&fileid=32745729 Exercise the rest of the output image region-related Set/Get methods for the sake of consistency.
88f2406 to
e6b9294
Compare
That's great. How is the coverage determined? Is it the number a specific (public) function is exercised with the test suite? |
|
CTest us used to drive a GNU tool call After ITK has been configured you should be able to run the individual ctest steps to start, configure,build,test,converage, and submit the results to the dashboard. I can't seem to find consisce documentation for this right now. Hopefully someone else will chime in. |
|
Cannot elaborate much on the documentation side, but for the sake of completeness, the coverage is reported nightly in the corresponding section of the CDash dashboard. If you inspect the coverage of a file, the number of calls a specific line gets is reported on the left side of each line. @romangrothausmann can you give a specific example of such a function that is not being reported as covered but is indeed being called? Just guessing, but if that happens, may be the answer is more on the |
|
Thanks for the comments. I'm not very familiar with code coverage tests so far, but the link above made me wonder if the coverage tests actually check if a filter was exercised for streaming, since the streaming implementation is an override. |
|
@romangrothausmann It's been a while since I have had a look at the multi-threading features, and have not checked your streaming enhancements from #392 in detail, and so I would not know to give an accurate answer, so I'll just be generalizing/guessing. Your PR #392 tests the streaming and non-streaming calls. If the streaming is performed, the base streaming class, if involved, will get an additional coverage count. If the base class is not called/it is an override, the base class count will remain unchanged. I acknowledge that when a method gets tens or hundreds of calls, we really cannot tell where they came from, though. When the count from one nightly report to another increases by one, unless there was a clear commit introducing a new call between them, then it is as hard. Other than that, if the same code is executed for the streamed and non-streamed cases, and if there are no conditional blocks based on number of stream divisions, the coverage will not let us know about it. May be @dzenanz or @thewtex could provide a more accurate answer to your question. |
|
@jhlegarreta @romangrothausmann both of your contributions are doing a fine job of improving our coverage! ⛑️ |
|
Thanks @jhlegarreta for the explanations. I think I understand better now. So, I guess, the answer to my question "Do the coverage reports show somehow that a particular filter was tested with streaming?" is No, because exercising streaming on some filter will only increase the count on the base streaming class and that will not be noted anywhere for the filter that uses it, e.g. we would not know that |
|
@romangrothausmann The involved base streaming class method should get one more count. |
Improve
itk::ResampleImageFilterclass coverage. Specifically, call andcheck the
GetExtrapolator()andGetOutputDirection()methods:http://testing.cdash.org/viewCoverageFile.php?buildid=5730024&fileid=32745729