public final class ServerCache extends Object
Static utility testing class to keep a Web Server open between tests. This is to prevent the expensive server creation/deploy occurring multiple times per test suite.
| Modifier and Type | Method and Description |
|---|---|
static LdeLauncher |
getLauncher()
Get the shared instance of the launcher.
|
static String |
getUrl() |
static boolean |
isInSuite() |
static boolean |
isRunning() |
static void |
restartServer()
Stop the server if it is running, then run it.
|
static void |
setInSuite(boolean flag)
Set true if running in a suite.
|
static WComponent |
setUI(String key,
WComponent ui)
Set the UI for the launcher.
|
static void |
startServer()
Start the server.
|
static void |
stopServer()
Stop the server.
|
public static LdeLauncher getLauncher()
Get the shared instance of the launcher.
Warning: ensure concurrency is considered with any commands run on the TestLauncher. Lock on the returned instance to ensure safe concurrent behaviour with other threads using this class.
public static String getUrl()
public static void stopServer()
public static void restartServer()
public static boolean isRunning()
public static void startServer()
public static void setInSuite(boolean flag)
flag - true if running in a suitepublic static boolean isInSuite()
public static WComponent setUI(String key, WComponent ui)
key - the UI keyui - the UI componentCopyright © 2018. All rights reserved.