I am unable to find a way that will give me a code coverage report for JSR 303 validation.
I’ve scoured the web and i cannot find a single reference to any attempted solution to this.
Im frankly at a complete and utter loss in how to attempt this.##
Would anyone know of way to attempt this?
Im ok with even changing my coverage tool if necessary. I use Cobertura and Jacoco.
Thanks for the help.
I think that the question is about validating that test cases cover all the expressed validation rules. I’m using the xml configuration, and have the same question.
My best idea, so far, would be to use an aspect on the
<V extends ConstraintValidator>.isValid()method (pardon the syntax), and use theContraintValidatorContextto figure out which rule is being processed. I haven’t tried this, I’m not even sure this would work.