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
Diwakar G 7Diwakar G 7 

Run Apex Tests

Hi,

I want run Apex test via webhook url. Basically, it should take Apex class and test class name, API key as parameters. It should return code coverage, passed and failed methods. How can I do this. Please help me.

Thanks and Regards,
Diwakar G
Raj VakatiRaj Vakati
You can use tooling REST api and call them from web hooks 


use 
/runTestsSynchronous/

https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/intro_rest_resources.htm