function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Test Class : How to cover Custom Setting

Hi All,
  I am creating a custom settings, assignning four parameter (Current page parameters) to custom setting.

after that i am reassigning these parameter to temperory MAP from custom setting (using for loop).

This part i am not able to cover in my Test Class.

Please assist me if someone is having any Idea




Deepak Kumar ShyoranDeepak Kumar Shyoran

Hi Abhishek,


If you want to cover the Custom setting in your code the you have  to create it first in your test class then write test method for thar class which uses those custom setting hopefullly they will cover those custom setting easily.


Don't forget to give Kudos if this post helped you.

Mark my answer as a solution to your question if it solve your problem.



Best Regards,

Choudhary Deepak Shyoran

Salesforce Developer