heroku/force — pull request #31 by kcshafer (2013-11-23 23:24:52+00:00)
Title: Add Command to run test classes

New command force tests, runs apex test classes using the RunTestsRequests call. Ability to specify classes to run or specify to run all. Returns number run, debug log, the coverage, the successes and the failures.

The new files tests.go is the command, and I added the callout and xml creation to the partner.go file. This was my first time using Go, so I was researching as I wrote this. If I could have done something more efficiently, I'd really like to know. The format of the output is below for the force tests all command.

NumberRun: 3

29.0 APEX_CODE,DEBUG;APEX_PROFILING,INFO

15:12:08.091|CUMULATIVE_LIMIT_USAGE_END

15:12:08.117 (117811000)|CODE_UNIT_FINISHED|testNumbers.testMakeNumbers2
15:12:08.117 (117819000)|EXECUTION_FINISHED

****Test Coverage****

DoStuff Class 100%
SampleClass Class 100%

Total 100%

****SUCCESSES****

testClass doTest
testNumbers testMakeNumbers

****FAILURES****

testNumbers testMakeNumbers2