|
||||||||||
| 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()
|
|
SlingTestBase(SlingInstanceState slingTestState,
Properties systemProperties)
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 |
org.apache.http.client.HttpClient |
getHttpClient()
|
RequestBuilder |
getRequestBuilder()
Start server if needed, and return a RequestBuilder that points to it |
RequestExecutor |
getRequestExecutor()
Returns a RequestExecutor for this server |
String |
getServerBaseUrl()
Start server if needed, and return its base URL |
String |
getServerPassword()
Return password configured for execution of HTTP requests |
String |
getServerUsername()
Return username configured for execution of HTTP requests |
WebconsoleClient |
getWebconsoleClient()
|
protected void |
installAdditionalBundles()
|
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()
public SlingTestBase(SlingInstanceState slingTestState,
Properties systemProperties)
| Method Detail |
|---|
protected void installAdditionalBundles()
public RequestBuilder getRequestBuilder()
getRequestBuilder in interface SlingInstancepublic String getServerBaseUrl()
getServerBaseUrl in interface SlingInstancepublic String getServerUsername()
getServerUsername in interface SlingInstancepublic String getServerPassword()
getServerPassword in interface SlingInstanceprotected void blockIfRequested()
protected void waitForServerReady()
throws Exception
Exceptionprotected List<File> getBundlesToInstall(String additionalBundlesPath)
public boolean isServerStartedByThisClass()
public org.apache.http.client.HttpClient getHttpClient()
public RequestExecutor getRequestExecutor()
SlingInstance
getRequestExecutor in interface SlingInstancepublic WebconsoleClient getWebconsoleClient()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||