• Jitendra Rana
  • NEWBIE
  • 0 Points
  • Member since 2017

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi,

 

I've written a couple of classes that should run on my production account in salesforce. I've finished my tests and everything works perfect. Now I'm trying to deploy the classes into my production account and get the following message in eclipse:


Average test coverage across all Apex Classes and Triggers is 74%, at least 75% test coverage is required    Cost Of Service        line 1    Force.com code coverage warning

 

When I run all tests in my prod account the average coverage on all classes is 82%.

 

The clas I'm trying to deploy has 74% coverage.

 

Here is the code of the first clas I'm trying to deploy:

 

 

I created a test class to bring the coverage from 2% to 74% but I'm obviously doing something wrong.

I would appreciate if someone could give me an example of how to write a test method for one of my methods so I can deploy this code.

 

Thanks

Tzuvy

  • August 11, 2010
  • Like
  • 0