0

I have a wrapper class which is not listed in "Overall Code Coverage" section of Developer Console. The wrapper class is active and is currently in use in other classes. The class was not generated through WSDLtoApex/JSOntoApex tools and was created manually. I need to check code coverage for this class.

Also, when I execute tests for classes which use my Wrapper class, the code coverage in None.

Can there be any reason for this class not showing in "Overall Code Coverage" section ?

6
  • 3
    Sometimes you need to clear your cache, as outlined here. Does this help?
    – sfdcfox
    Commented Mar 30, 2018 at 7:09
  • It didn't work. I cleared the code coverage cache and executed the test classes but still the my wrapper class is not visible.
    – user54240
    Commented Mar 30, 2018 at 9:03
  • 1
    Can you confirm that the tests for the classes which use this wrapper execute a code path that results in invoking wrapper class methods?
    – David Reed
    Commented Mar 30, 2018 at 10:56
  • 3
    @user54240 If your Wrapper class only contains variable declaration and not any apex methods then developer console will not show your class under Overall Code Coverage. And such classes without methods doesn't require code coverage.
    – sfdc_sk
    Commented Mar 30, 2018 at 11:29
  • @sfdc_sk That was the issue!! I checked and the class contains only inner classes with variables. Thanks a lot!!
    – user54240
    Commented Apr 2, 2018 at 9:17

1 Answer 1

3

If your Wrapper class only contains variable declaration and not any apex methods, then developer console will not show your class under Overall Code Coverage section. And such classes without methods doesn't require code coverage.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .