You need to sign in to do that
Don't have an account?
how to debug test classes and @future method
Hi,
I need some information on how to debug test classes. I divide into 3 parts.
1) In eclipse IDE I can see debug logs but total log is not being displayed.The log is very big and only some portion is visible and even we are not able to search in that. I need to copy that log into a notepad and then do ctrl + F. Is there any easy way to do that.
2) I tried checking the logs in force.com by enabling debug logs but I cant see the logs getting created while running test classes.
3) This is the actual problem . I am writing a test class for a method which returns success message in the end but before returning success the method performs some operations and in turn calls a @future method.
I have written the invoking of that test method in test.starttest() and test.stoptest() block and after that block an assertequals statement checking for success but still I dont see the ctrl getting back to my actual method for which I have written test class. I dont see any exceptions except that my assert statement getting failed.
Please let me know what is the best way to debug test classes and any solution for @future methods.
Thank you.
Could you share your code, It will be helpful to figure out the issue. And test classes by default show a logs of complete execution so you don't need to de any thing.
Thanks Shashikant . I figured that problem . There was a problem in my assert statement . I wasted lot of time unnecessarily on that. Any ways finally my test class is working fine. Regarding the other points 1 and 2 any suggestions on those.
Thanks