heroku/force — pull request #30 by kcshafer (2013-11-23 23:13:26+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