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 BrowserTestRule
browserRule
Used for ignoring tests that useIgnoreBrowser
andIgnoreBrowsers
annotations.protected static org.xwiki.component.embed.EmbeddableComponentManager
componentManager
protected static PersistentTestContext
context
TestDebugger
testDebugger
Generates debugging information on test failure.org.junit.rules.TestName
testName
The object used to access the name of the current test.static ValidateConsoleRule
validateConsole
Validate 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 void
beforeTest()
static PersistentTestContext
getContext()
protected static XWikiWebDriver
getDriver()
protected String
getTestClassName()
protected String
getTestMethodName()
protected static TestUtils
getUtil()
static void
init()
static void
init(List<XWikiExecutor> executors)
static void
initializeSystem(PersistentTestContext context)
Used so that AllTests can set the persistent test context.static void
setContext(PersistentTestContext testContext)
static void
shutdown()
-
-
-
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 useIgnoreBrowser
andIgnoreBrowsers
annotations.
-
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.
-
-