Class IsolatedServerTest
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
com.onenetwork.platform.tools.test.junit4.IsolatedServerTest
- All Implemented Interfaces:
org.junit.runner.Describable
,org.junit.runner.manipulation.Filterable
,org.junit.runner.manipulation.Sortable
public class IsolatedServerTest extends ServerTest
Server Test runner variant that sends separate execution requests for each test method.
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(IsolatedServerTest.class) @OnServerRunWith(Theories.class) public class MyTheoriesTest { ... }
- Since:
- 20.0
- See Also:
ServerTest
-
Constructor Summary
Constructors Constructor Description IsolatedServerTest(java.lang.Class<?> testClass, org.junit.runners.model.RunnerBuilder suiteBuilder)
-
Method Summary
Modifier and Type Method Description 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
-
IsolatedServerTest
public IsolatedServerTest(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.- Overrides:
runOnClient
in classServerTest
- Parameters:
notifier
-client-side test run observer
- See Also:
com.onenetwork.platform.tools.test.runner.ServerTest#runOnClient(org.junit.runner.notification.RunNotifier)
-