+1 vote
25 views
by (163k points)

What are three ways for a developer to execute tests in an Org from the following options ?

  1. Bulk API
  2. Tooling API
  3. Setup Menu
  4. SalesforceDX
  5. MetaData API

In my opinion, it should be Tooling API, Setup Menu, and MetaData API. Because -

Setup Menu - By browsing to setup->Apex Test Execution
Tooling API - You can also run tests using the Tooling REST API. Use the /runTestsAsynchronous/ and /runTestsSynchronous/ endpoints to run tests asynchronously or synchronously.
MetaData API - Not sure about it. But found a link - Unit tests executed via metadata API failing on call to system.test.startTest

Reference link- https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_unit_tests_running.htm

Also how can a developer check the test coverage of active Process Builder and Flows before deploying them in a change set?

Please suggest your opinion with references and steps to produce. Thanks

1 Answer

+1 vote
by (163k points)
 
Best answer

Setup Menu, Tooling API and SalesforceDX.

The link you provided mentions that as well (https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_testing_unit_tests_running.htm)

Running Tests Through the Salesforce User Interface

Running Tests Using the Salesforce Extensions for Visual Studio Code

VS Code uses sfdx.

Running Tests Using the API - You can also run tests using the Tooling REST API.

Regarding coverage, have a look at the following link:

https://releasenotes.docs.salesforce.com/en-us/winter19/release-notes/rn_forcecom_flow_test_coverage.htm

Welcome to Memory Exceeded, where you can ask questions and receive answers from other members of the community.
...