Activity Forums Salesforce® Discussions How can I call test classes in future method in Salesforce?

  • PRANAV

    Member
    February 9, 2018 at 11:43 am

    Hi,

    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.

    Hope this helps you.

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos