function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Nikhil SagarNikhil Sagar 

Can anyone help me: How to create "casehistory" in test class(Here the case history will create when the case status is changed)..??

Suraj Tripathi 47Suraj Tripathi 47

Hi Nikhil,

You need to create fake data for CaseHistory (just like you create the records for Case Object in test method) and use that data in the test class.
You can take references from the below link:

https://trailblazer.salesforce.com/ideaView?id=08730000000h6RwAAI

Please mark it as the Best Answer if your queries are solved

Thank You