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
cathy369cathy369 

Catch 22 with SeeAllData=true in test class

I've created a nightmare for myself.  I used SeeAllData=true in a test class, and the data has changed.  All my system asserts are failing.

I can change it in the sandbox to be appropriate or to actually put the records in the test class, but when I validate it in production, it fails on that test.

Part of the reason I used it in the first place was due to failing for govern limits.

Help please!!   It would be so gratefully appreciated.
Akhil ReddyAkhil Reddy
Hi Cathy, 

1. Correct action 
- if you go throght the below referece @13 yuo can notice that new account data is created from actual data in organization so that you can do assertion can be done.
- Static resource file can be uploaded as Test data and is it in Test class.
2. I would suggest to drop/ delete the test class from PORD and redeploy the new TEST class with correct method.