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
Neethu uNeethu u 

Please help me to sort the correct answer for this question What are the three ways for a developer to execute tests in an org 1.Bulk API 2.Metadata API 3. Tooling API 4.Developer console ​5.Set Up Menu

Neethu uNeethu u
Hi Sampath
Thanks for your response. I have seen some docs mentioning metadata API also being used for execute tests
https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_running_tests.htm

Can u please clarify why metadata API can't be an answer for the above question?
Apex HoursApex Hours
Any answer on this? If we have to choose 3 among - Bulk API, Tooling API, Setup Menu, SalesforceDX,Metadata API - between Metadata API and SalesforceDX - choosing SalesforceDX and others are Setup Menu Tooling API. Please confirm.
Rahul Garg SFDRahul Garg SFD
Hi, 

A developer can execute tests on Apex class in the following ways::
1. Setup menu on salesforce UI (using setup → Apex Test Execution)
2. From Visual studio code
3. From Developer console
4. Use the runTests() call from the SOAP API to run tests synchronously
5. Using the Tooling REST API. Use the /runTestsAsynchronous/ and /runTestsSynchronous/ endpoints to run tests       asynchronously or synchronously.
6. Run tests asynchronously using ApexTestQueueItem.

So the Answer will be 3. Tooling API, 4.Developer Console, 5.Setup menu

Look at the following link for reference, 
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_unit_tests_running.htm