Package org.xwiki.test.ui
Class AbstractTest
- java.lang.Object
-
- org.xwiki.test.ui.AbstractTest
-
- Direct Known Subclasses:
AbstractGuestTest
public abstract class AbstractTest extends Object
To be extended by all Test Classes. Allows to start/stop the Web Driver and get access to it.- Since:
- 3.2M3
- Version:
- $Id: cea5a2834dc9afbcfc871b4ec775cb4190232a45 $
-
-
Field Summary
Fields Modifier and Type Field Description BrowserTestRulebrowserRuleUsed for ignoring tests that useIgnoreBrowserandIgnoreBrowsersannotations.protected static org.xwiki.component.embed.EmbeddableComponentManagercomponentManagerprotected static PersistentTestContextcontextTestDebuggertestDebuggerGenerates debugging information on test failure.org.junit.rules.TestNametestNameThe object used to access the name of the current test.static ValidateConsoleRulevalidateConsoleValidate stdout/stderr for problems.
-
Constructor Summary
Constructors Constructor Description AbstractTest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeforeTest()static PersistentTestContextgetContext()protected static XWikiWebDrivergetDriver()protected StringgetTestClassName()protected StringgetTestMethodName()protected static TestUtilsgetUtil()static voidinit()static voidinit(List<XWikiExecutor> executors)static voidinitializeSystem(PersistentTestContext context)Used so that AllTests can set the persistent test context.static voidsetContext(PersistentTestContext testContext)static voidshutdown()
-
-
-
Field Detail
-
validateConsole
public static final ValidateConsoleRule validateConsole
Validate stdout/stderr for problems.
-
testName
public final org.junit.rules.TestName testName
The object used to access the name of the current test.
-
browserRule
public BrowserTestRule browserRule
Used for ignoring tests that useIgnoreBrowserandIgnoreBrowsersannotations.
-
testDebugger
public TestDebugger testDebugger
Generates debugging information on test failure.
-
context
protected static PersistentTestContext context
-
componentManager
protected static org.xwiki.component.embed.EmbeddableComponentManager componentManager
-
-
Method Detail
-
initializeSystem
public static void initializeSystem(PersistentTestContext context) throws Exception
Used so that AllTests can set the persistent test context.- Throws:
Exception
-
setContext
public static void setContext(PersistentTestContext testContext)
-
getContext
public static PersistentTestContext getContext()
-
init
public static void init(List<XWikiExecutor> executors) throws Exception
- Throws:
Exception
-
beforeTest
public void beforeTest()
-
getTestMethodName
protected String getTestMethodName()
-
getTestClassName
protected String getTestClassName()
-
getDriver
protected static XWikiWebDriver getDriver()
-
getUtil
protected static TestUtils getUtil()
- Returns:
- Utility class with functions not specific to any test or element.
-
-