Reputation: 51
I'm developing a rest API on IntelliJ and I was wondering if there's a way to exclude Jackson generated classes from test coverage. Searching online I didn't find anything except a way to tell IntelliJ to exclude some packages, but I thought that the annotation @Generated would automatically exclude generated classes.
Thanks in advance
Upvotes: 0
Views: 489
Reputation: 51
Edit: I finally found the solution: I changed the run configurations of my application
Run -> Edit configurations.. -> Modify options -> Specify alternative coverage runner -> I chose JaCoCo instead of IntelliJ -> Apply
Now the coverage is 100% because JaCoCo skips the classes with the @Generated annotation
Upvotes: 0