com.atlassian.jira.webtests.util
Class AbstractEnvironmentData

java.lang.Object
  extended by com.atlassian.jira.webtests.util.AbstractEnvironmentData
All Implemented Interfaces:
JIRAEnvironmentData
Direct Known Subclasses:
CargoEnvironmentData, LocalTestEnvironmentData

public abstract class AbstractEnvironmentData
extends Object
implements JIRAEnvironmentData


Constructor Summary
protected AbstractEnvironmentData(Properties properties)
           
 
Method Summary
protected abstract  String getEdition()
           
protected  String getEnvironmentProperty(String key, String defaultValue)
           
 String getProperty(String key)
          Returns a property from the test environment.
 String getReleaseInfo()
          This is the expected release information shown under "Installation Type" on the sysinfo page.
 Class<? extends junit.framework.TestCase> getSingleTestClass()
          Run a specifically named test instead of the normal suite
 String getTenant()
          Returns the tenant to run requests on.
 boolean isAllTests()
           
 boolean isBundledPluginsOnly()
           
 boolean isSingleNamedTest()
           
 boolean isTpmLdapTests()
          A special suite of tests that connect to an LDAP server on LabManager (TPM).
 boolean shouldCreateDummyTenant()
          Whether a dummy tenant should be created after the tenant is created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.webtests.util.JIRAEnvironmentData
getBaseUrl, getContext, getJIRAHomeLocation, getWorkingDirectory, getXMLDataLocation
 

Constructor Detail

AbstractEnvironmentData

protected AbstractEnvironmentData(Properties properties)
Method Detail

isBundledPluginsOnly

public boolean isBundledPluginsOnly()
Specified by:
isBundledPluginsOnly in interface JIRAEnvironmentData

isTpmLdapTests

public boolean isTpmLdapTests()
Description copied from interface: JIRAEnvironmentData
A special suite of tests that connect to an LDAP server on LabManager (TPM).

Specified by:
isTpmLdapTests in interface JIRAEnvironmentData
Returns:
true if we are running the TPM LDAP tests only.

isAllTests

public boolean isAllTests()
Specified by:
isAllTests in interface JIRAEnvironmentData

getEdition

protected abstract String getEdition()

getReleaseInfo

public String getReleaseInfo()
Description copied from interface: JIRAEnvironmentData
This is the expected release information shown under "Installation Type" on the sysinfo page.

Specified by:
getReleaseInfo in interface JIRAEnvironmentData
Returns:
the expected release information shown under "Installation Type" on the sysinfo page.

getProperty

public String getProperty(String key)
Description copied from interface: JIRAEnvironmentData
Returns a property from the test environment. If the property is not available it returns null.

Specified by:
getProperty in interface JIRAEnvironmentData
Parameters:
key - the property key
Returns:
a property from the test environment, or null if not available.

getEnvironmentProperty

protected String getEnvironmentProperty(String key,
                                        String defaultValue)

isSingleNamedTest

public boolean isSingleNamedTest()
Specified by:
isSingleNamedTest in interface JIRAEnvironmentData

getTenant

public String getTenant()
Description copied from interface: JIRAEnvironmentData
Returns the tenant to run requests on. This triggers X-Atlassian-Tenant to be set for each request to this value. If null, no header is set.

Specified by:
getTenant in interface JIRAEnvironmentData
Returns:
The tenant

shouldCreateDummyTenant

public boolean shouldCreateDummyTenant()
Description copied from interface: JIRAEnvironmentData
Whether a dummy tenant should be created after the tenant is created. This is useful for picking up issues where tenant specific state is statically referenced, so the most recently created tenant is fine, but older tenants fail. The dummy tenant will be fine, but the tests will be run against the older tenant.

Specified by:
shouldCreateDummyTenant in interface JIRAEnvironmentData
Returns:
true if a dummy tenant should be created after the tenant is created.

getSingleTestClass

public Class<? extends junit.framework.TestCase> getSingleTestClass()
Description copied from interface: JIRAEnvironmentData
Run a specifically named test instead of the normal suite

Specified by:
getSingleTestClass in interface JIRAEnvironmentData


Copyright © 2002-2012 Atlassian. All Rights Reserved.