Newer Version Available
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:
| Name | Type | Description |
|---|---|---|
| classes | CompileClassResult | Information about the success or failure of the compileAndTest() call if classes were being compiled. |
| deleteClasses | DeleteApexResult | Information about the success or failure of the compileAndTest() call if classes were being deleted. |
| deleteTriggers | DeleteApexResult | Information about the success or failure of the compileAndTest() call if triggers were being deleted. |
| runTestsResult | RunTestsResult | Information about the success or failure of the Apex unit tests, if any were specified. |
| success | boolean | If 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: |
| triggers | CompileTriggerResult | Information 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:
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:
| Name | Type | Description |
|---|---|---|
| bodyCrc | int | The CRC (cyclic redundancy check) of the trigger file. |
| column | int | The column where an error occurred, if one did. |
| id | ID | An ID is created for each compiled trigger. The ID is unique within an organization. |
| line | int | The line number where an error occurred, if one did. |
| name | string | The name of the trigger. |
| problem | string | The description of the problem if an error occurred. |
| success | boolean | If 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:
| Name | Type | Description |
|---|---|---|
| id | ID | ID of the deleted trigger or class. The ID is unique within an organization. |
| problem | string | The description of the problem if an error occurred. |
| success | boolean | If true, all the specified classes or triggers were deleted successfully. If any class or trigger is not deleted, the value is false. |