nerdexam
Salesforce

PDII · Question #89

What is a consideration when testing batch Apex? (Choose two.)

The correct answer is B. Test methods must call the batch execute() method once D. Test methods must run the batch between Test.startTest() and Test.stopTest(). See the full explanation below for the reasoning.

Question

What is a consideration when testing batch Apex? (Choose two.)

Options

  • ATest methods must execute the batch with a scope size of less than 200 records
  • BTest methods must call the batch execute() method once
  • CTest methods must use the @isTest (SeeAllData=true) annotation
  • DTest methods must run the batch between Test.startTest() and Test.stopTest()

How the community answered

(42 responses)
  • A
    19% (8)
  • B
    74% (31)
  • C
    7% (3)

Community Discussion

No community discussion yet for this question.

Full PDII Practice