public class LocalTestCaseRunner extends Object implements TestCaseRunner, Serializable
TestCaseRunner
that runs tests on the current JVM.
This object can be also sent to a remote channel to execute tests over there.
Constructor and Description |
---|
LocalTestCaseRunner(File reportDirectory) |
Modifier and Type | Method and Description |
---|---|
junit.framework.Test |
buildTestCase(String fileName) |
TestCaseRunner |
copyTo(hudson.remoting.Channel channel)
Creates a clone on the given channel and returns a proxy to it.
|
protected boolean |
isTest(Class<?> c) |
void |
redirectToDevNull()
Redirects the stdout/stderr to /dev/null.
|
Result |
runTestCase(String fileName)
Runs a single test case and returns the result.
|
Result |
runTestCase(String fileName,
String methodName) |
junit.framework.TestResult |
runTests(junit.framework.Test all,
PrintStream report)
Run tests and send the progress report to the given
PrintStream . |
void |
setUp(List<URL> classpath,
boolean quiet)
Prepares for the test execution.
|
void |
tearDown()
The clean up that pairs with
TestCaseRunner.setUp(List, boolean) |
protected String |
toClassName(String name)
Converts a file name of a class file to a class name.
|
public LocalTestCaseRunner(File reportDirectory)
public void setUp(List<URL> classpath, boolean quiet)
TestCaseRunner
setUp
in interface TestCaseRunner
public Result runTestCase(String fileName)
TestCaseRunner
runTestCase
in interface TestCaseRunner
fileName
- File name of the test case class, relative to the class directory root.public void redirectToDevNull()
public junit.framework.Test buildTestCase(String fileName)
public junit.framework.TestResult runTests(junit.framework.Test all, PrintStream report)
PrintStream
.public void tearDown()
TestCaseRunner
TestCaseRunner.setUp(List, boolean)
tearDown
in interface TestCaseRunner
protected boolean isTest(Class<?> c)
protected String toClassName(String name)
public TestCaseRunner copyTo(hudson.remoting.Channel channel) throws IOException, InterruptedException
IOException
InterruptedException
Copyright © 2012. All Rights Reserved.