Skip to main content
In Sandbox, the Apex Code Coverage shows : 81%

 

Whereas in production it shows only 55%

 

Any thoughts ? ?
3 respostas
  1. 1 de out. de 2013, 03:54
    Hey Raj,

     

    You sandbox and production instances have totally different data, so your tests will run on different data as well.

     

    The way around this is to create all new records in the beginning of your test class.  Make sure not to use the SeeAllData=true annotation!

     

    Also - your production org might have certain configurations that may be generating errors in your test class and lowering its coverage.  These could be validation rules, custom settings, workflows, etc.  

     

    Hope this helps!

     

    David
0/9000