Developers spend a lot of time writing Factory Classes or the like which generate Test Data for our Test Classes. Thankfully, we can annotate these classes with @isTest so they don't count against our Apex Classes' Character Limit.
SandboxPostCopy is a great feature, but it would be amazing if we could access our @isTest Factory Classes since
- It's already written to generate Test Data.
- It would be very unfortunate if we had to spend Apex Class Characters to generate all that Data when the Apex Classes would never really be used in Production.
As written, SandboxPostCopy Classes can be used in Production Code, but is this necesary? Similar to @isTest, why not have an annotation called something like "@isSandboxPostCopy" that only allows Classes with this annotation to be executed upon Sanbdox Post Copy? That way, @isSandboxPostCopy classes can't be executed in Production ... which would allow @isSandboxPostCopy to access @isTest Classes since it's in a controlled execution environment.