CompileAndTestResult

The compileAndTest() call returns information about the compile and unit test run of the specified Apex, including whether it succeeded or failed.

A CompileAndTestResult object has the following properties:

NameTypeDescription
classesCompileClassResultInformation about the success or failure of the compileAndTest() call if classes were being compiled.
deleteClassesDeleteApexResultInformation about the success or failure of the compileAndTest() call if classes were being deleted.
deleteTriggersDeleteApexResultInformation about the success or failure of the compileAndTest() call if triggers were being deleted.
runTestsResultRunTestsResultInformation about the success or failure of the Apex unit tests, if any were specified.
successbooleanIf true, all of the classes, triggers, and unit tests specified ran successfully. If any class, trigger, or unit test failed, the value is false, and details are reported in the corresponding result object:
triggersCompileTriggerResultInformation about the success or failure of the compileAndTest() call if triggers were being compiled.

CompileClassResult 

This object is returned as part of a compileAndTest() or compileClasses() call. It contains information about whether or not the compile and run of the specified Apex was successful.

A CompileClassResult object has the following properties:

NameTypeDescription
bodyCrcintThe CRC (cyclic redundancy check) of the class or trigger file.
columnintThe column number where an error occurred, if one did.
idIDAn ID is created for each compiled class. The ID is unique within an organization.
lineintThe line number where an error occurred, if one did.
namestringThe name of the class.
problemstringThe description of the problem if an error occurred.
successbooleanIf true, the class or classes compiled successfully. If false, problems are specified in other properties of this object.

CompileTriggerResult 

This object is returned as part of a compileAndTest() or compileTriggers() call. It contains information about whether or not the compile and run of the specified Apex was successful.

A CompileTriggerResult object has the following properties:

NameTypeDescription
bodyCrcintThe CRC (cyclic redundancy check) of the trigger file.
columnintThe column where an error occurred, if one did.
idIDAn ID is created for each compiled trigger. The ID is unique within an organization.
lineintThe line number where an error occurred, if one did.
namestringThe name of the trigger.
problemstringThe description of the problem if an error occurred.
successbooleanIf true, all the specified triggers compiled and ran successfully. If the compilation or execution of any trigger fails, the value is false.

DeleteApexResult 

This object is returned when the compileAndTest() call returns information about the deletion of a class or trigger.

A DeleteApexResult object has the following properties:

NameTypeDescription
idIDID of the deleted trigger or class. The ID is unique within an organization.
problemstringThe description of the problem if an error occurred.
successbooleanIf true, all the specified classes or triggers were deleted successfully. If any class or trigger is not deleted, the value is false.