You need to sign in to do that
Don't have an account?
vinni shree
How to create a test report data in test class
Is there any way to create test report data in test class instead of using seealldata=true?
Thank you
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Is there any way to create test report data in test class instead of using seealldata=true?
Thank you
You would need to use the Analytics API in your class. Check below references that can help you.
https://salesforce.stackexchange.com/questions/188914/how-to-create-report-not-report-data-in-apex-test-class-without-using-seeallda
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_analytics_test_reports.htm
Please mark as Best Answer if above information was helpful.
Thanks,
Hi vinay,
If we do this way then there might be chancing of failing deployement I guess so any other way please suggest.
Thank you
For now, we have to use seealldata=true or Analytics API and I haven't seen any other way to mock test class.
Hope this helps...
Thanks,