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
Arut JothiArut Jothi 

Data Isolation for Unit Test Code

How does Salesforce platform isolate the unit test data from org data (esp. when we have same the object in both org as well as test)??
GhanshyamChoudhariGhanshyamChoudhari
when you are using @isTest annotation in class and testMethod  in methods so in backend salesforce identifies this is test data which will not store in object
Arut JothiArut Jothi
My question is not about what salesforce is doing with the @isTest annotation, but rather how does the platform achieves this isolation (more in terms of architecture or design)? Like does it create object replica that has the same permission sets and other associate metadata or does it lock away the org data?

I understand that this is not exactly a development related question but couldn't find any details on this.