What do you get when you mix a long holiday weekend with a guy afflicted with ADSO (attention deficit...oh! shiny object)? You get new code for the Salesforce Tooling API! That's right, I added the following functionality over the weekend to the nforce-tooling plugin for nforce. So now you can run the following from your node.js code:
- ApexOrgWideCoverage - returns code coverage test results for an entire org.
- ApexCodeCoverage - returns code coverage test results for an Apex class or trigger including the percent covered, the number of lines covered and uncovered by tests and the actual line numbers of uncovered the code.
- RunTestsAsynchronous - executes the tests for specified classes and returns test coverage status of tests.
For example, here is a test script that deploys 2 Apex class and their accompanying test classes and then runs all tests asychronously to return the results. It then cleans up after itself by deleting the classes that were deployed. The output looks something like:
I'm working on some cool stuff for the tooling plugin and hope to have something to show in the next couple of weeks.