7

Is there a single question and answer that I can link to for generic questions arising from SeeAllData defaulting to false on @IsTest?

Once it is clear that the question is about not seeing current Organization data due to the isolation of tests the final answer becomes a boiler plate of ideally scripting in the required test data to make it portable or failing that using SeeAllData=true.

This is a fairly common problem, so it would be cleaner to have a single reference for it.

E.g. The question SOQL query produces results in Execute Anonymous, but returns zero records when running a test seemed fair enough. If you didn't know the existing Org data was being ignored it could be hard to figure out what was going on.

My answer was fairly minimal as it seemed like a very common problem that should already have a good answer somewhere that was a bit more generic.

1 Answer 1

10

Feel free to ask the perfect @IsTest SeeAllData question, and answer it yourself! I've done this in the past, albeit with different motivation: Is there a way to make the insert not fail if one record fails?

3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .