Work.com
Leading Through Change with Data
COVID-19 Data Hub
COVID-19 Global Daily Tracker
Global Economy Data Track
Government Data Track
Healthcare Data Track
B-Well Together
Leading Through Change
Salesforce Care
Leading Through Change Blog
Trailhead Resources
AppExchange Resources
MuleSoft Resources
< Back to List
Robert Nunemaker
Custom Settings should be treated as a Setup Object for APEX Tests
Customization & App Building
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
A.A. Ron - 6 years ago
Robert Nunemaker - 6 years ago
Mohammed Khan - 7 years ago
Chandra Lohani - 7 years ago
Scott Eng - 7 years ago
Doug Adcock - 7 years ago
Sutharsan Pushparajah - 7 years ago
Ken Gibson - 7 years ago
Baird Straughan - 7 years ago
Kirill Yunussov - 8 years ago
dav condev - 8 years ago
Matthew Lamb - 8 years ago
Soporte LeadClic - 8 years ago
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.