1

Is it possible to deploy a simple Tab (i.e object created in Sandbox) to production without any class and trigger ?

I tried but i am getting the error as follows

Your organization's code coverage is 69%. You need at least 75% coverage to complete this deployment.

Can anybody help on it ?

Thanks in advance!

1 Answer 1

1

To answer your question, yes, it is possible to deploy just a Tab - if production has the expected (75%+) code coverage at the time of deployment.

Your situation could arise if 1. developers have created deployed/altered code in production without also adding additional test coverage, or 2. if they have altered test methods so that they no longer cover the code they did at the time they were deployed, since the last deployment.

To remedy this, you will have to speak to your org's developers to bring the code coverage in production to at least 75% - and it's recommended to bring it up higher to avoid situations like this, especially when many people are working within one org. The 75% coverage is a hard limit enforced by Salesforce.

9
  • Thanks @Bri . Can You tell me what is exactly this 75% code.
    – Cloud Arch
    Commented Apr 6, 2015 at 14:13
  • It's a measure of the portion of Apex covered by unit tests in your environment. That is, (the number of lines of non-test Apex executed by your unit tests) / (the number of total lines of Apex that are not marked by @isTest). Note that coverage will be "counted" towards the 75% as long as the lines are executed and the test "passes," that is, that a System.assert() method does not fail. Although not best practice, you can easily make up missing coverage in a pinch with this fact. Commented Apr 6, 2015 at 14:20
  • I am the only developer for my org. Can you tell me how to get rid for this.
    – Cloud Arch
    Commented Apr 6, 2015 at 14:23
  • As i can see my org code coverage is 69% right now
    – Cloud Arch
    Commented Apr 6, 2015 at 14:25
  • 2
    To add on to what @bri said. . . You may have had much higher code coverage at one point in time. Adding validation rules and required fields in your production org may cause your test classes to fail. If your tests are failing due to new requirements inside your production org, updating and deploying them may result in higher code coverage. I would run all test classes in production to see if any fail from validations.
    – Berg
    Commented Apr 6, 2015 at 14:28

You must log in to answer this question.

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