2

I would like to increase my unit test coverage.

I am using communities in our org.

Salesforce comes with a bunch of existing controllers for communities:

  • ChangePasswordController
  • SiteRegisterController
  • SiteLoginController
  • CommunitiesLandingController
  • CommunitiesLoginController
  • CommunitiesSelfRegConfirmController
  • CommunitiesSelfRegController
  • ForgotPasswordController
  • LightningLoginFormController
  • LightningSelfRegisterController
  • MyProfilePageController
  • LightningForgotPasswordController

Are there test classes available?

or

Does anyone have test classes they have already written?

1
  • 2
    If you are not using them delete them. Nothing worse when touching a code base than to find dead code that distracts from the real code. – Keith C Jun 26 '18 at 22:22
5

You dont need to write any code coverage for these. As soon as you enable communities salesforce creates these classes along with test classes. If you enhance these classes then only you need to increase the code coverage. enter image description here

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.