• sivanov
  • NEWBIE
  • 10 Points
  • Member since 2018

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 1
    Replies
Hello,
Our company is trying to deploy Apex code for the first time from sandbox to production. I read in your docs that you need to have 75% coverage or above to deploy. When I run validation, it seems like a lot of test cases that we didn't write (I'm guessing they are Salesforce tests) are failing, and seem to have lower than 100% coverage. I am guessing this is also pulling our overall coverage down. Is there anyone who could point me in the right direction for how to get these tests cases to pass so that I could deploy?

Here's an example of a test failure in a class that is also not written by us:
Class: AttachmentsToFilesControllerTest
Method: migrationBatchRunStandardUser
Errors: NAMForbiddenException: You don't have permission to access these fields on ContentVersion. Ask your Salesforce admin for help.

Any ideas why so many of these built-in classes have such low coverage and seem to be failing?
I have attached a screenshot of the dev console after I run tests on sandbox:
Built in Salesforce test cases failing
Hello,
Our company is trying to deploy Apex code for the first time from sandbox to production. I read in your docs that you need to have 75% coverage or above to deploy. When I run validation, it seems like a lot of test cases that we didn't write (I'm guessing they are Salesforce tests) are failing, and seem to have lower than 100% coverage. I am guessing this is also pulling our overall coverage down. Is there anyone who could point me in the right direction for how to get these tests cases to pass so that I could deploy?

Here's an example of a test failure in a class that is also not written by us:
Class: AttachmentsToFilesControllerTest
Method: migrationBatchRunStandardUser
Errors: NAMForbiddenException: You don't have permission to access these fields on ContentVersion. Ask your Salesforce admin for help.

Any ideas why so many of these built-in classes have such low coverage and seem to be failing?
I have attached a screenshot of the dev console after I run tests on sandbox:
Built in Salesforce test cases failing