public class ServerTestRunner
extends org.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner
@RunWith(ServerTestRunner.class) @RunWithServerSession() @RunWithSubject("anna") public class YourTest { ... }Execution:
ServerSessionProvider
or a custom provider to RunWithServerSession.provider()
.Before
, the Test
-annotated method and all After
methods are invoked
in a single transaction. But if the Test
-annotated method uses the timeout feature (i.e.
Test.timeout()
), the three parts are executed in different transactions.RunWithServerSession
,
RunWithSubject
org.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner.InterceptedAfterStatement, org.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner.InterceptedBeforeStatement, org.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner.RunAftersStatement
Constructor and Description |
---|
ServerTestRunner(Class<?> clazz) |
Modifier and Type | Method and Description |
---|---|
protected org.eclipse.scout.rt.platform.context.RunContext |
createJUnitRunContext() |
protected boolean |
expectsException(org.junit.Test annotation) |
protected org.junit.runners.model.Statement |
interceptClassLevelStatement(org.junit.runners.model.Statement next,
Class<?> testClass) |
protected org.junit.runners.model.Statement |
interceptMethodLevelStatement(org.junit.runners.model.Statement next,
Class<?> testClass,
Method testMethod) |
classBlock, getTimeoutMillis, hasNoTimeout, interceptAfterClassStatement, interceptAfterStatement, interceptBeforeClassStatement, interceptBeforeStatement, methodBlock, possiblyExpectingExceptions, withAfterClasses, withAfters, withBeforeClasses, withBefores, withPotentialTimeout
collectInitializationErrors, computeTestMethods, createTest, describeChild, getChildren, getTestRules, isIgnored, methodInvoker, rules, runChild, testName, validateConstructor, validateFields, validateInstanceMethods, validateNoNonStaticInnerClass, validateOnlyOneConstructor, validateTestMethods, validateZeroArgConstructor
public ServerTestRunner(Class<?> clazz) throws org.junit.runners.model.InitializationError
org.junit.runners.model.InitializationError
protected org.junit.runners.model.Statement interceptClassLevelStatement(org.junit.runners.model.Statement next, Class<?> testClass)
interceptClassLevelStatement
in class org.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner
protected boolean expectsException(org.junit.Test annotation)
protected org.junit.runners.model.Statement interceptMethodLevelStatement(org.junit.runners.model.Statement next, Class<?> testClass, Method testMethod)
interceptMethodLevelStatement
in class org.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner
protected org.eclipse.scout.rt.platform.context.RunContext createJUnitRunContext()
createJUnitRunContext
in class org.eclipse.scout.rt.testing.platform.runner.PlatformTestRunner
Copyright © 2010–2018. All rights reserved.