function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
KMK91KMK91 

How we will write test classes in future method?

debasis jena 35debasis jena 35
Hi Madhukar,

Put the call to the future method inside startTest/stopTest:

 Test.startTest();
         myClass.futuremethod( someID );
 Test.stopTest();

Test.stopTest() does not return until your future method has completed.
IshwarIshwar
are you making any callout in future method? 
 
debasis jena 35debasis jena 35
please mark the answer as best answer if it helps you to solve the problem.