public class JUnitTestRunner extends Object implements Runnable
Copyright (c) 2016. All Rights Reserved. Oracle Corporation.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates.
| Modifier and Type | Class and Description |
|---|---|
static class |
JUnitTestRunner.Listener
An instance of a JUnit
RunListener that listens for JUnit run events
and forwards them on the the RemoteChannel as JUnitTestListener.Events. |
static class |
JUnitTestRunner.StartTests
A
RemoteCallable to use to start a test run. |
static class |
JUnitTestRunner.State
The different states that this
JUnitTestRunner can be in. |
static class |
JUnitTestRunner.StopTests
A
RemoteCallable to use to stop a test run. |
| Modifier and Type | Field and Description |
|---|---|
static RemoteChannel |
channel
The
RemoteChannel to use to publish JUnit test events. |
static JUnitTestRunner |
INSTANCE
The singleton instance of the
JUnitTestRunner. |
static StreamName |
STREAM_NAME
The name of the event stream that will be used to send JUnit test events.
|
| Constructor and Description |
|---|
JUnitTestRunner() |
| Modifier and Type | Method and Description |
|---|---|
JUnitTestRunner.State |
getState()
Obtain the current
JUnitTestRunner.State. |
static void |
main(String[] args)
The main entry point for this application.
|
void |
run()
The main run method.
|
void |
run(com.oracle.bedrock.OptionsByType optionsByType)
Wait until the
JUnitTestRunner is in the JUnitTestRunner.State.Waiting state
and then start a test run using the specified OptionsByType. |
void |
stop()
Set the current state to
JUnitTestRunner.State.Stopped, which will cause
the application to exit. |
public static final StreamName STREAM_NAME
public static final JUnitTestRunner INSTANCE
JUnitTestRunner.public static RemoteChannel channel
RemoteChannel to use to publish JUnit test events.public JUnitTestRunner.State getState()
JUnitTestRunner.State.JUnitTestRunner.Statepublic void run(com.oracle.bedrock.OptionsByType optionsByType)
JUnitTestRunner is in the JUnitTestRunner.State.Waiting state
and then start a test run using the specified OptionsByType.optionsByType - the OptionsByType controlling the test runpublic void stop()
JUnitTestRunner.State.Stopped, which will cause
the application to exit.
If a test run is in progress it will be halted after the current test class has completed.
public static void main(String[] args)
args - the application argumentsCopyright © 2017. All rights reserved.