Why would a developer use Test. startTest( ) and Test.stopTest( )?
Change Image Delete
A. To avoid Apex code coverage requirements for the code between these lines B. To start and stop anonymous block execution when executing anonymousApex code C. To indicate test code so that it does not Impact Apex line count governor limits. D. To create an additional set of governor limits during the execution of a single test class.
When the test actually begins in a Salesforce account, that can be determined using the starttest method. This will noted in the test code. Everything listed in the test code before the start test is the part that needs to allow to you do the test. There are certain limitations that can occur during the start test and stop test methods.
Only two SOQL queries can be made between these two parts. The parts of the code that falls in between the starttest and stoptest is the new set of governor limits. When a user develops these two methods in the test code, they are doing this in order to create an additional set of governor limits. This would take place during the execution of a single test class.