Debug Logs for Apex Test Results

When you run a test, the output is sent to the log. Debug logs display on the right side of the Force.com IDE’s Apex Test Results view.

Force.com IDE is in a maintenance-only state. We still provide support for the product through our official channels, but updates prior to October 12, 2019 will be only for critical security issues that arise. On October 12, 2019, we will no longer provide support or updates of any kind for Force.com IDE. On that date, we will also begin archiving documentation and removing download links for the product. We recommend that you start migrating to Salesforce Extensions for Visual Studio Code or one of the great tools made by our partners. For more information, see The Future of Salesforce IDEs on the Salesforce Developers Blog.

Warning

  • The first part of the log details the events that occurred during the test run.
  • The next few lines give details on how long it took to execute specific lines of code. This information is useful for performance tuning.
  • The debug log then lists how many resources a program uses and the total amount available for each resource. The Apex runtime engine tracks the resources that every script uses so that a single script doesn’t monopolize the servers. If you write a script that goes over one of the limits, you receive an error message.
To define logging levels for Apex test execution:
  1. Select Run | Run Configurations | Apex Test.
  2. To create a test run configuration, select New launch configuration (New launch configuration icon).
  3. To customize your log levels, select the Project tab, and then select Use logging.
Run Configurations window: Project tab