1

In production, code coverage is showing 83%. In sandbox, it is showing 75%. I have just 1 apex class and associated test class I am trying to deploy to production, but it fails saying only 30% coverage. The apex class I am trying to deploy has 90% coverage, why can't I deploy this class and associated test class to production?

3
  • 1
    What test run level did you choose when performing the deployment? Does your unit test class use seeAllData=true? What does the actual code look like?
    – David Reed
    Commented May 29, 2019 at 0:11
  • I use the "Default" test level @DavidReed. I am not using seeAllData=true. I did notice that the test class does NOT have any assert statements, though the ape class shows 90% coverage. Would this cause an issue? Commented May 29, 2019 at 0:20
  • Do you have any unmanaged package installed in the org? Do you 'see' the test coverage overall and for individual classes? help.salesforce.com/… (not undermining anyone's expertise - just putting it out there for future reference!) Commented May 29, 2019 at 1:37

1 Answer 1

1

I was missing a trigger in my change set. The trigger actually called the apex class, adding that fixed it.

You must log in to answer this question.

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