You need to sign in to do that
Don't have an account?
vinni shree
seealldata=true for profile or report
Hi,
To test the org data in the test class for which sobject we use seeAllData= true. Is it for profile or report. I worked for report ewith seealldata =true but few resources mentioned profile don't need seealldata=true for test class we can directly get the org data.Please clarify
Thank you
It depends on your controller on if you want to use seealldata=true or no. Annotate your test class or test method with IsTest(SeeAllData=true) to open up data access to records in your organization. The IsTest(SeeAllData=true) annotation applies to data queries but doesn't apply to record creation or changes, including deletions. New and changed records are still rolled back in Apex tests even when using the annotation.
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_seealldata_using.htm
Please mark as Best Answer if above information was helpful.
Thanks,