+ Start a Discussion
jucuzoglujucuzoglu 

Create/Test/Deploy Triggers from APEX code (what options do I have?)

I'd like to use the Metadata API (in a similar manner as Eclipse and other 3rd party IDE's) to Test and Deploy triggers and test classes that are generated based on criteria supplied by users.

 

How do external tools accomplish this? (like Eclipse)

 

Can the process be mimicked via APEX?

Best Answer chosen by Admin (Salesforce Developers) 
jeremyyjeremyy

Eclipse uses the metadata API.

 

You can't modify metadata from Apex. However, it's possible to call an outside web service from Apex that would then make metadata calls.

All Answers

jeremyyjeremyy

Eclipse uses the metadata API.

 

You can't modify metadata from Apex. However, it's possible to call an outside web service from Apex that would then make metadata calls.

This was selected as the best answer
igoldsteinigoldstein

Also keep an eye out for the Async Test API (Beta) in the Winter '12 release. This will allow you to start asynchronous test runs from your Apex code.


See http://www.salesforce.com/us/developer/docs/apexcodepre/Content/apex_testing_unit_tests_running.htm#APISectionTitle for more details.