You need to sign in to do that
Don't have an account?

No more than one executeBatch can be called from within a test method
HI All,
I have written testmethod with including annotation (Seealldata=true), 3 Weeks back its working fine ... But now we r getting some issue (No more than one executeBatch can be called from within a test method).
In google most of them says .. before start the process please delete all the records from the Object .. If i delete the records from the object ? whether it will be affecting Original records OR not ?
Thanks in Advance,
Vinoth
You can remove SeeAllData=True then it will work fine. Any special reason for that visibling Alldata? You can create the datas in test method instead of that.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
I have already tried , what u have suggested it will not resolve the issue .. i mean it will not cover the execute method from batch class :( ... thats the only reason i have included (Seealldata=true). by the way i m using standard object history ...
Can u please let me know if i delete the records from the object whether it will be affecting the Original object records ?
Through testmethod the DML which occured are not commited in the database. So it doesn't affect real object data.
Use test.startTest() and test.stopTest() as well there.
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
Okie Fine :) Let me try this and let u know .....
Thank you