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
Anton FlärdAnton Flärd 

Synchronous tests do not update Code Coverage - multiple questions

Hi
I'm in a tricky situation and have some questions.
  1. Running test synchronously make my tests pass, which ofcourse I understand since they are not including other test. But the questoin is, why are my Code Coverage not updated when running tests synchronously
  2. Running my test asynchronously is making 3/5 tests fail because of another class failing and that class is (hidden) when I try to open it, so I can't change it... the class failing is shc.BatchEmailSender and shc.shccontroller. Are these general or specific?
  3. I just got access to our Sandbox and I should have full access to everthing there, why are these classes still hidden? Might it be because they might come from AppExchange?
  4. How can I proceed in this matter? I really can't change the way my tests are done since they need to use DML Insert statements to create dummy data. Also tried directly with Database.Insert(sObject) statement but same classes fail.

Thanks in advance.
Best Answer chosen by Anton Flärd
Anton FlärdAnton Flärd
Splitting the testcases with "insert" statements into separate classes resolved the issue.