Custom Settings should be treated as a Setup Object for APEX Tests - Ideas - Salesforce Trailblazer Community
Trailblazer Community

All Ideas

Idea Details

Post an Idea
This idea has been merged into another idea. To comment or vote on this idea, please visit Custom Metadata Types.
0  Points voting closed
Merged
Merged

Custom Settings should be treated as a Setup Object for APEX Tests

Salesforce Platform, Apex & Visualforce

With the implementation of API 24, a Test by default must create it's own data.  However, that includes Custom Settings.  This is very problematic because if we have dozens of Custom Settings that are impacted by the insert of test records, they must all be created to take advantage of the new requirement of creating your own data.  Using SeeAllData defeats this and doesn't encourage good test habits.  Custom settings should be considered a setup object during tests so that Test plans can see them and we can focus on functionality and the way things are in Production rather than trying to copy dozens of entries for purposes of a simple test.

· Flag

Latest Comment from Salesforce

  • A.A. Ron - 5 years ago

    That is correct, the rows of Custom Metadata Types , being metadata themselves, will be cached and will be accessible through Apex without needing SOQL. 

    Unfortunately, Custom Settings themselves cannot be upgraded or extended to become Custom Metadata Types. Migrating from Custom Settings will not be easy in some cases. But for many customers and partners the advantages of being able to create metadata rows will out weight the cost of migration. 
  • Upvotes
  • Downvotes

Ideas

Apps

from AppExchange

Questions

No results found.

Help us to keep IdeaExchange clean by pointing out overlapping ideas. We'll investigate your suggestion and merge the ideas if it makes sense.



 

 

Thanks for your merge suggestion. We will review it shortly and merge the ideas if applicable.

Salesforce takes abuse situations very seriously. Examples of abuse include but are not limited to posting of offensive language or fraudulent statements. To help us process your request as quickly as possible, please fill out the form below describing the situation. For privacy and security reasons, the final outcome of an abuse case may not be revealed to the person who reported it.


 

Thank you for your feedback. We take abuse seriously and will investigate this issue and take appropriate action.