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
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?
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.
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
Tooling 3.API, 4.Developer Console, 5.Setup menu
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_unit_tests_running.htm
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?
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