Activity Forums Salesforce Questions and Answers Problem in batch class in salesforce

  • Problem in batch class in salesforce

  • Deepak

    September 20, 2019 at 1:28 pm

    I am writing a test class of batch class it code coverage is 80% but my execute part is not covered. Is it necessary to cover execute part?

  • Nikita

    September 23, 2019 at 6:48 am


    Hi Deepak,

    Yes, it is necessary to cover the execute method of a batch class in the test class. If start is returning a batch ( which is rows returned by the query locator) then only it will go in the execute method.

Viewing 1 - 2 of 2 posts

Log In to reply.

Popular Salesforce Blogs

Popular Salesforce Videos