I need to write unit tests to call a method that validates the content of a Reports.ReportResults
Object.
Is there a way to create reports programmatically, execute them and use the Reports.ReportResults
Object for a Unit Test ?
Regards
Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. It only takes a minute to sign up.
Sign up to join this communityI reckon, if you just create the test data via one of the following ways
And as long as the data that you create fits into the filter criteria of the report, your test class would give you positive result and you can assert the data.