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

Sudden change in code coverage

Hey all,

Wondering if anyone can suggest reasons as to how code coverage could suddenly drop in a production org.

We have a development shop with several developers working on our code base.  Yesterday at around noon, one of us successfully deployed a change set with no issues.  Later in the afternoon, another change set failed for the same developer, citing "Code Coverage Error".  The funny thing is, it doesn't appear to have actually tried to run the tests, as the "Run Apex Tests" chart doesn't show any progress.

We thought that perhaps some flows/workflow rule changes could be to blame, but our setup audit trail doesn't show any changes to these.

We are also seeing some odd behaviour on test execution in our production org, with the apex test execution page showing tests failed, but when you click the line to see detail, it shows as passed.  It also displays a weird message, naming the class by id?

odd apex test runner output
Best Answer chosen by jwalsh
Turns out the code coverage angle was a bit of a red herring.  The true error turned out to be the process builder calling an invocable method.  The process/method work as expected, but the presence of this process seems to have broken change set deployment.  Once we deleted the process, changesets successfully deploy again.