Prepare Interview

Mock Exams

Make Homepage

Bookmark this page

Subscribe Email Address

Question: What is the purpose of the 'Test.startTest()' and 'Test.stopTest()' methods in Apex testing?
Answer: 'Test.startTest()' and 'Test.stopTest()' methods in Apex testing are used to separate the execution context for the part of the code that precedes 'startTest()' and the part that follows 'stopTest()'. This is helpful for testing asynchronous code and resetting governor limits.
Is it helpful? Yes No

Most helpful rated by users:

©2025 WithoutBook