You need to sign in to do that
Don't have an account?
Binu 8
Showing Code Coverage Failure
HI Team,
I am new to salesforce. When I am trying to move my change sets from sandbox to production Code Coverage Failure is showing.
I have a Apex controller and visual force page in sandbox. Apex class have only one method which is return an agregate result of a custom object.
And I am showing some dashboard in VF page using these results. How can I write test cases for this one method and improve code coverage?
Could you please give a better suggestions to improve the code coverage or any examples?
I am new to salesforce. When I am trying to move my change sets from sandbox to production Code Coverage Failure is showing.
I have a Apex controller and visual force page in sandbox. Apex class have only one method which is return an agregate result of a custom object.
And I am showing some dashboard in VF page using these results. How can I write test cases for this one method and improve code coverage?
Could you please give a better suggestions to improve the code coverage or any examples?
All Answers
The page does not exist..could you please check?
I wrote a test class like this.And executed the test.It is completed with no error. And after that I uploaded the change sets to production.But In production the same error is showng.I did not upload the test class file.I think I missed it to upload the test class.Is that right?
@isTest
public class SubscriptionReportTest {
@isTest static void testSubscriptionData(){
LIST<AggregateResult> slist = SubscriptionReportController.getSubscriptionData(2015);
System.debug(slist);
System.assert(true);
LIST<AggregateResult> slist1 = SubscriptionReportController.getSubscriptionData(2014);
System.assert(true);
}
}