Test coverage goal of 60% for core classes
Tentative initial code coverage 60%?
- Use jacoco to evaluate code coverage
- Should we use the existing JAI-EXT operator tests to account for some initial level of code coverage?
- We could also use the initial coverage provided by to find unused classes and move them to the unsupported package
Also restore comparison tests
While comparison tests are done, do we have an evaluation of code coverage to work from?
There is a batch of operators that are used downstream in GeoTools:
- SubSampleAverage
- ...
@dromagnoli I am moving this to milestone 0.9.0 as the current coverage has reached 60% (considering all the exercise by the individual operator modules).
Hi @jodygarnett. That sounds reasonable indeed. Operations living on their dedicated module are already above 60% of code coverage (with a few exceptions, i.e: convolve).
The current work to increase the core code coverage is on this branch: https://github.com/dromagnoli/imagen/tree/code-coverage.
So far I have increased coverage for some operators/classes being currently used in other projects (i.e. GT/GS) but there is plenty of core classes that are not actively used but are fields or referred by other methods in other core classes.
I have already moved to unsupported some classes that have no usages. Then I have also created test cases for some classes that are actively used. With that work, I have raised a bit the total coverage from 56% to around 62%:
Some operators or classes require some understanding/debug/dedicate testing to increase the test coverage. Adding some trivial tests to filtering / color conversion operations resulted in failures. I think that we should create dedicated ticket for those operations in order to fully understand how they works (they are quite complex in terms of underlying maths) so that we can figure out if they are working properly and prepare set with expected inputs and expected outputs. Namely:
- colorConvert and underlying colorspace classes such as ColorSpaceJAIExt and IHSColorSpaceJAIExt
- SubsampleAverageOpImage
- FilteredSubsampleOpImage
Trivial test classes for them result in failing assertions so they should require dedicated analysis and tests.