public class ClientSideTeleporter
extends org.apache.sling.junit.rules.TeleporterRule
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_TEST_SERVLET_PATH |
Constructor and Description |
---|
ClientSideTeleporter() |
Modifier and Type | Method and Description |
---|---|
void |
addAdditionalBundleHeader(String name,
String value)
Set additional bundle headers on the generated test bundle
|
org.junit.runners.model.Statement |
apply(org.junit.runners.model.Statement base,
org.junit.runner.Description description) |
ClientSideTeleporter |
embedClass(Class<?> c)
Indicate that a specific class must be embedded in the test bundle.
|
void |
embedClassesDirectory(File classesDirectory)
Embeds every class found in the given directory
|
ClientSideTeleporter |
excludeDependencyPrefix(String prefix)
Define a prefix for class names that should not be embedded
in the test bundle.
|
Map<String,String> |
getAdditionalBundleHeaders() |
ClientSideTeleporter |
includeDependencyPrefix(String prefix)
Define a prefix for class names that can be embedded
in the test bundle if the
DependencyAnalyzer thinks
they should. |
void |
setBaseUrl(String url) |
protected void |
setClassUnderTest(Class<?> c) |
void |
setDirectoryForPersistingTestBundles(File directoryForPersistingTestBundles) |
void |
setEnableLogging(boolean enableLogging) |
void |
setPreventToUninstallBundle(boolean preventToUninstallTestBundle) |
void |
setServerCredentials(String username,
String password)
Set the credentials to use to install our test bundle on the server
|
void |
setTestReadyTimeoutSeconds(int tm)
Define how long to wait for our test to be ready on the server-side,
after installing the test bundle
|
void |
setTestServletPath(String testServletPath) |
void |
setWaitForServiceTimoutSeconds(int tm)
Define how long to wait to get a service reference.
|
void |
setWebConsoleReadyTimeoutSeconds(int tm)
Define how long to wait for the webconsole to be ready, before installing the test bundle
|
public static final String DEFAULT_TEST_SERVLET_PATH
public void setBaseUrl(String url)
protected void setClassUnderTest(Class<?> c)
setClassUnderTest
in class org.apache.sling.junit.rules.TeleporterRule
public void setTestReadyTimeoutSeconds(int tm)
public void setWebConsoleReadyTimeoutSeconds(int tm)
public void setWaitForServiceTimoutSeconds(int tm)
TeleporterRule.getService(Class)
or TeleporterRule.getService(Class, String)
methods.public void setServerCredentials(String username, String password)
public void setTestServletPath(String testServletPath)
testServletPath
- relative path to the Sling JUnit test servlet. If null, defaults to DEFAULT_TEST_SERVLET_PATH.public ClientSideTeleporter includeDependencyPrefix(String prefix)
DependencyAnalyzer
thinks
they should. Overridden by excludeDependencyPrefix(java.lang.String)
if
any conflicts arise.public ClientSideTeleporter excludeDependencyPrefix(String prefix)
includeDependencyPrefix(java.lang.String)
.public ClientSideTeleporter embedClass(Class<?> c)
public void addAdditionalBundleHeader(String name, String value)
public void setEnableLogging(boolean enableLogging)
public void setPreventToUninstallBundle(boolean preventToUninstallTestBundle)
public void setDirectoryForPersistingTestBundles(File directoryForPersistingTestBundles)
public void embedClassesDirectory(File classesDirectory) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description)
apply
in interface org.junit.rules.TestRule
apply
in class org.junit.rules.ExternalResource
Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.