function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Matrix ReturnsMatrix Returns 

how to cover system.debug(+value) line in test class

Best Answer chosen by Matrix Returns
Arvind KumarArvind Kumar
Hi Rajdeep,

Hemant is saying correctly. System.debug('*********'+Value) doesn't require to cover in code coverage. It is used for checking your output.
It is a way how you can output data. It is used for checking your output. You can see the output statement in the debug log. you can use this in every apex method or trigger

Thanks,
Arvind Kumar  

All Answers

Hemant_JainHemant_Jain
System.debug doesn't require any coverage. It is excluded from the lines of code to cover.
Arvind KumarArvind Kumar
Hi Rajdeep,

Hemant is saying correctly. System.debug('*********'+Value) doesn't require to cover in code coverage. It is used for checking your output.
It is a way how you can output data. It is used for checking your output. You can see the output statement in the debug log. you can use this in every apex method or trigger

Thanks,
Arvind Kumar  
This was selected as the best answer