public class JUnitCore extends Object
This class is not intended to be subclassed or instantiated by clients.
| Modifier and Type | Field and Description |
|---|---|
static String |
JUNIT_CONTAINER_ID
ID of the JUnit classpath container.
|
static IPath |
JUNIT3_CONTAINER_PATH
Path of the JUnit 3 classpath container.
|
static IPath |
JUNIT4_CONTAINER_PATH
Path of the JUnit 4 classpath container.
|
| Constructor and Description |
|---|
JUnitCore() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addTestRunListener(ITestRunListener listener)
Deprecated.
As of 3.3, replaced by
addTestRunListener(TestRunListener) |
static void |
addTestRunListener(TestRunListener listener)
Adds a listener for test runs.
|
static void |
exportTestRunSession(ITestRunSession testRunSession,
File file)
Exports the given test run session into an XML report file.
|
static void |
exportTestRunSession(ITestRunSession testRunSession,
OutputStream output)
Exports the given test run session to an output stream.
|
static IType[] |
findTestTypes(IJavaElement container,
IProgressMonitor monitor)
Finds types that contain JUnit tests in the given container.
|
static ITestRunSession |
importTestRunSession(File file)
Imports a test run session from the given file.
|
static ITestRunSession |
importTestRunSession(String url,
IProgressMonitor monitor)
Imports a test run session from the given URL.
|
static void |
removeTestRunListener(ITestRunListener listener)
Deprecated.
As of 3.3, replaced by
removeTestRunListener(TestRunListener) |
static void |
removeTestRunListener(TestRunListener listener)
Removes a listener for test runs.
|
public static final String JUNIT_CONTAINER_ID
JUNIT3_CONTAINER_PATH,
JUNIT4_CONTAINER_PATH,
Constant Field Valuespublic static final IPath JUNIT3_CONTAINER_PATH
public static final IPath JUNIT4_CONTAINER_PATH
public static void addTestRunListener(ITestRunListener listener)
addTestRunListener(TestRunListener)listener - listener to be addedpublic static void removeTestRunListener(ITestRunListener listener)
removeTestRunListener(TestRunListener)listener - listener to be removedpublic static void addTestRunListener(TestRunListener listener)
Note: If your plug-in should be loaded when a test run starts,
please contribute to the org.eclipse.jdt.junit.testRunListeners extension point instead.
listener - the listener to be addedpublic static void removeTestRunListener(TestRunListener listener)
listener - the listener to be removedpublic static IType[] findTestTypes(IJavaElement container, IProgressMonitor monitor) throws CoreException, OperationCanceledException
container - the containermonitor - the progress monitor used to report progress and request cancelation,
or null if noneCoreException - when a problem occurs while accessing container or its childrenOperationCanceledException - if the operation has been canceledpublic static void exportTestRunSession(ITestRunSession testRunSession, File file) throws CoreException
testRunSession - the test run sessionfile - the destinationCoreException - if an error occurredpublic static void exportTestRunSession(ITestRunSession testRunSession, OutputStream output) throws CoreException
testRunSession - the test run sessionoutput - the output streamCoreException - if an error occurredpublic static ITestRunSession importTestRunSession(File file) throws CoreException
file - a file containing a test run session transcriptCoreException - if the import failedpublic static ITestRunSession importTestRunSession(String url, IProgressMonitor monitor) throws CoreException
url - an URL to a test run session transcriptmonitor - a progress monitor for cancellationnull if the import has been cancelledCoreException - if the import failed
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.