You need to sign in to do that
Don't have an account?
neerureddy
TestMethod
Hi ,
I have a customcontroller, which calls BatchApex Class. Now, I need to write the testmethod. Here, My question is whether I have to write the testmethod for controller or Batch Apex. Because I have 2 more methods in controller,which needs testmethod too. Appreciate help. Thanks in advance.
You should write testmethods for both - that way you'd be able to deploy the batch or controller in isolation. That said, I often find testing the controller allows you to exercise the rest of the code.
Testing batch apex has its own wrinkles - make sure to read the apex developer's guide for the test restrictions.
Good luck.
The total code coverage will include any other classes/triggers etc that are present in your org.
If the classes you are deploying have > 75% code coverage, you should be good to go.
Thanks bob,
Yeah it included other classes and so many triggers. Ok... I am good to go as you said..