Check for java, javac, and junit prior to grading question;
Wrapped output in <div style="white-space:pre-wrap;"></div> so that it looks like a pre.
Using ->execute_process instead of capturing stdErr to file;
Using regex to find test, failure, and error counts instead of the ., .F, and .E notations;