public class SlingTestBase extends Object implements SlingInstance
Modifier and Type | Field and Description |
---|---|
static String |
ADDITONAL_BUNDLES_PATH |
static String |
ADDITONAL_BUNDLES_UNINSTALL |
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 and Description |
---|
SlingTestBase() |
SlingTestBase(SlingInstanceState slingTestState,
Properties systemProperties)
Get configuration but do not start server yet, that's done on demand
|
Modifier and Type | Method and Description |
---|---|
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()
Get the list of additional bundles to install, as specified by the system property
ADDITONAL_BUNDLES_PATH |
protected List<File> |
getBundlesToInstall(String additionalBundlesPath)
Get the list of additional bundles to install, as specified by additionalBundlesPath 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 |
uninstallAdditionalBundles() |
void |
uninstallAdditionalBundlesIfNecessary()
Automatically by the SlingRemoteTestRunner since package version 1.1.0.
|
protected void |
waitForServerReady()
Check a number of server URLs for readyness
|
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 ADDITONAL_BUNDLES_UNINSTALL
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
public SlingTestBase()
public SlingTestBase(SlingInstanceState slingTestState, Properties systemProperties)
public void uninstallAdditionalBundlesIfNecessary()
protected void installAdditionalBundles()
protected void uninstallAdditionalBundles()
public RequestBuilder getRequestBuilder()
getRequestBuilder
in interface SlingInstance
public String getServerBaseUrl()
getServerBaseUrl
in interface SlingInstance
public String getServerUsername()
getServerUsername
in interface SlingInstance
public String getServerPassword()
getServerPassword
in interface SlingInstance
protected void blockIfRequested()
protected void waitForServerReady() throws Exception
Exception
protected List<File> getBundlesToInstall()
ADDITONAL_BUNDLES_PATH
File
s pointing to the Bundle JARs or the empty list in case no additional bundles should be installed (never null
).protected List<File> getBundlesToInstall(String additionalBundlesPath)
public boolean isServerStartedByThisClass()
public org.apache.http.client.HttpClient getHttpClient()
public RequestExecutor getRequestExecutor()
SlingInstance
getRequestExecutor
in interface SlingInstance
public WebconsoleClient getWebconsoleClient()
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.