Class ServerTest
java.lang.Object
org.junit.runner.Runner
com.onenetwork.platform.tools.test.junit4.RemoteCapableRunner
com.onenetwork.platform.tools.test.junit4.ForwardingRemoteRunner
com.onenetwork.platform.tools.test.junit4.ServerTest
- All Implemented Interfaces:
org.junit.runner.Describable
,org.junit.runner.manipulation.Filterable
,org.junit.runner.manipulation.Sortable
- Direct Known Subclasses:
IsolatedServerTest
public class ServerTest extends ForwardingRemoteRunner
JUnit4 test executor that executes test on a remote server. Whole test class
will be executed in one execution request.
By default, tests run on server side using default JUnit4 runner. However, this can be configured by annotating test class with
For example, to run theories test on server, use:
By default, tests run on server side using default JUnit4 runner. However, this can be configured by annotating test class with
@OnServerRunWith
.For example, to run theories test on server, use:
@RunWith(ServerTest.class) @OnServerRunWith(Theories.class) public class MyTheoriesTest { ... }
- Since:
- 20.0
-
Constructor Summary
Constructors Constructor Description ServerTest(java.lang.Class<?> testClass, org.junit.runners.model.RunnerBuilder suiteBuilder)
-
Method Summary
Modifier and Type Method Description protected RemoteTestExecutor
initExecutor()
Initiates atest executor
object responsible for sending test execution requests to remote server.void
runOnClient(org.junit.runner.notification.RunNotifier notifier)
Invoked to run tests on the side of a client machine.Methods inherited from class com.onenetwork.platform.tools.test.junit4.ForwardingRemoteRunner
classBlock, doRunOnServer, filter, filterDelegate, getDelegateRunnerClass, getDescription, initDelegateRunner, initDelegateRunnerProperties, sort, sortDelegate
Methods inherited from class com.onenetwork.platform.tools.test.junit4.RemoteCapableRunner
execute, executor, getTestClass, isRunningOnServer, run, runOnServer
-
Constructor Details
-
ServerTest
public ServerTest(java.lang.Class<?> testClass, org.junit.runners.model.RunnerBuilder suiteBuilder) throws org.junit.runners.model.InitializationError- Throws:
org.junit.runners.model.InitializationError
-
-
Method Details
-
runOnClient
public void runOnClient(org.junit.runner.notification.RunNotifier notifier)Description copied from class:RemoteCapableRunner
Invoked to run tests on the side of a client machine. Implementations are expected to not actually run tests when this method invoked, but instead send a test execution request(s) to remote server.- Specified by:
runOnClient
in classRemoteCapableRunner
- Parameters:
notifier
-client-side test run observer
- See Also:
com.onenetwork.platform.tools.test.runner.RemoteCapableRunner#runOnClient(org.junit.runner.notification.RunNotifier)
-
initExecutor
Description copied from class:RemoteCapableRunner
Initiates atest executor
object responsible for sending test execution requests to remote server.- Specified by:
initExecutor
in classRemoteCapableRunner
- Returns:
- See Also:
com.onenetwork.platform.tools.test.runner.RemoteCapableRunner#initExecutor()
-