You need to sign in to do that
Don't have an account?
stevedot
Deploying Unit Test also failed with message "at least 75% test coverage is required."
At first, deploying Apex failed with the message "Average test coverage across all Apex Classes and Triggers is 74%, at least 75% test coverage is required."
So i try to up the test coverage % by deploying only Unit Test , but the Unit Test deployment also failed with message "Average test coverage across all Apex Classes and Triggers is 74%, at least 75% test coverage is required."
How am i going to up the test coverage % when SF won't allow me to deploy Unit Test?
So i try to up the test coverage % by deploying only Unit Test , but the Unit Test deployment also failed with message "Average test coverage across all Apex Classes and Triggers is 74%, at least 75% test coverage is required."
How am i going to up the test coverage % when SF won't allow me to deploy Unit Test?
If you are deploying all class then there will be no problem with the test coverage as the whole organization has atleast 75% test coverage. when you are trying to deploy a individual class (each class 75% test coverage is required)if that class doenot has the 75% test coverage then it will be problem for deployment.
Please go throught the below URL for more details.
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_testing_best_practices.htm
http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_deploying_ant_deploy.htm
[If it helps, mark it as "Best Answer"]
Thanks,
Rockzz
But now i'm just trying to deploy Unit Test @isTest and it still failed with test coverage 75% required.
How can i bring up the test coverage to at least 75% when SF won't even allow me deploy Unit Test?
Thanks
Use the @isTest(SeeAllData=true)
[If it helps, mark it as "Best Answer"]
Thanks,
Rockzz
this is my test unit i'm trying to deploy, even this alone failed with "at least 75% test coverage is required."
@isTest(SeeAllData=true)
private class testrunFRWCaseReporting {
static testMethod void runFRWCaseReporting_testmethod(){
Test.startTest();
runFRWCaseReporting rcr = new runFRWCaseReporting();
SchedulableContext sc;
rcr.execute(sc);
Test.stopTest();
}
}
Create test data in your test class based your controller and suppose your using Lead object in controller create test data for Lead object check below code.Finally call your controller method in your test class.
Thanks,
Rockzz