|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.sling.testing.tools.sling.SlingTestBase
public class SlingTestBase
Base class for running tests against a Sling instance, takes care of starting Sling and waiting for it to be ready.
| Field Summary | |
|---|---|
static String |
ADDITONAL_BUNDLES_PATH
|
static String |
ADMIN
|
static String |
BUNDLE_INSTALL_TIMEOUT_SECONDS
|
static String |
BUNDLE_TO_INSTALL_PREFIX
|
static String |
KEEP_JAR_RUNNING_PROP
|
static String |
SERVER_HOSTNAME_PROP
|
static String |
SERVER_READY_PROP_PREFIX
|
static String |
SERVER_READY_TIMEOUT_PROP
|
static String |
START_BUNDLES_TIMEOUT_SECONDS
|
static String |
TEST_SERVER_PASSWORD
|
static String |
TEST_SERVER_URL_PROP
|
static String |
TEST_SERVER_USERNAME
|
| Constructor Summary | |
|---|---|
SlingTestBase()
Get configuration but do not start server yet, that's done on demand |
|
| Method Summary | |
|---|---|
protected void |
blockIfRequested()
Optionally block here so that the runnable jar stays up - we can then run tests against it from another VM. |
protected List<File> |
getBundlesToInstall(String additionalBundlesPath)
Get the list of additional bundles to install, as specified by path parameter |
protected org.apache.http.client.HttpClient |
getHttpClient()
|
protected RequestBuilder |
getRequestBuilder()
Start server if needed, and return a RequestBuilder that points to it |
protected RequestExecutor |
getRequestExecutor()
|
protected String |
getServerBaseUrl()
Start server if needed, and return its base URL |
protected String |
getServerPassword()
Return password configured for execution of HTTP requests |
protected String |
getServerUsername()
Return username configured for execution of HTTP requests |
protected WebconsoleClient |
getWebconsoleClient()
|
protected void |
installAdditionalBundles()
|
protected boolean |
isServerStartedByThisClass()
|
protected void |
waitForServerReady()
Check a number of server URLs for readyness |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TEST_SERVER_URL_PROP
public static final String TEST_SERVER_USERNAME
public static final String TEST_SERVER_PASSWORD
public static final String SERVER_READY_TIMEOUT_PROP
public static final String SERVER_READY_PROP_PREFIX
public static final String KEEP_JAR_RUNNING_PROP
public static final String SERVER_HOSTNAME_PROP
public static final String ADDITONAL_BUNDLES_PATH
public static final String BUNDLE_TO_INSTALL_PREFIX
public static final String START_BUNDLES_TIMEOUT_SECONDS
public static final String BUNDLE_INSTALL_TIMEOUT_SECONDS
public static final String ADMIN
| Constructor Detail |
|---|
public SlingTestBase()
| Method Detail |
|---|
protected void installAdditionalBundles()
protected RequestBuilder getRequestBuilder()
protected String getServerBaseUrl()
protected String getServerUsername()
protected String getServerPassword()
protected void blockIfRequested()
protected void waitForServerReady()
throws Exception
Exceptionprotected List<File> getBundlesToInstall(String additionalBundlesPath)
protected boolean isServerStartedByThisClass()
protected org.apache.http.client.HttpClient getHttpClient()
protected RequestExecutor getRequestExecutor()
protected WebconsoleClient getWebconsoleClient()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||