You need to sign in to do that
Don't have an account?
Sandeep Yadav
database.executeBatch is not covered by test class
Hi everyone,
I am calling this method from test class and it is not covering the statements inside if condition.
what's going wrong!!
Any help would be appreciate.
I am calling this method from test class and it is not covering the statements inside if condition.
what's going wrong!!
Any help would be appreciate.
Remove test.isRunningtest line and check once.
Hope this helps you!
If my answer helps resolve your query, please mark it as the 'Best Answer' & upvote it to benefit others.
More Info :
https://help.salesforce.com/articleView?id=000205831&type=1
https://developer.salesforce.com/forums/?id=9060G000000Ub1HQAS
Thanks
Varaprasad
@For SFDC Support: varaprasad4sfdc@gmail.com
Blog: http://salesforceprasad.blogspot.com/
Salesforce latest interview questions :
https://www.youtube.com/channel/UCOcam_Hb4KjeBdYJlJWV_ZA?sub_confirmation=1
I already checked it.
when i remove Test.isRunningTest() from the code then it gives the error like this:
System.UnexpectedException: Start did not return a valid iterable object.
Please let me know you wrote below line in your test class or not before calling the Start_CBI_BatchJob() method?
Let me know if it will not help.
Thanks,
Yogesh
I wrote this statement before calling Start_CBI_BatchJob() method. pbar is the class instance from which i calling the method.
Still I got the same error:-
System.UnexpectedException: Start did not return a valid iterable object.
Can you share your batch class ? So i can be more clear.
Check below url it might helpful for you.
https://developer.salesforce.com/forums/?id=906F0000000DCb9IAG
Thanks,
Yogesh
Gmail : yogeshwer1994@gmail.com