PrintStream newErrStream = new PrintStream(errStream);
String out;
String err;
try {
System.setErr(newErrStream);
results = runner.runTests();
} finally {
out = outStream.toString();
err = errStream.toString();
newOutStream.close();
System.setOut(oldOutStream);