I need to write unit tests to call a method that validates the content of a
Is there a way to create reports programmatically, execute them and use the
Reports.ReportResultsObject for a Unit Test ?
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 community
I 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.