Skip to main content
Rajaraman Anandhakrishnan 님이 #Sales And Marketing에 질문했습니다
In Sandbox, the Apex Code Coverage shows : 81%

 

Whereas in production it shows only 55%

 

Any thoughts ? ?
답변 3개
  1. 2013년 10월 1일 오전 3: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