com.atlassian.jira.webtests.util
Class LocalTestEnvironmentData

java.lang.Object
  extended by com.atlassian.jira.webtests.util.AbstractEnvironmentData
      extended by com.atlassian.jira.webtests.util.LocalTestEnvironmentData
All Implemented Interfaces:
com.atlassian.jira.testkit.client.JIRAEnvironmentData

public class LocalTestEnvironmentData
extends AbstractEnvironmentData


Constructor Summary
LocalTestEnvironmentData()
           
LocalTestEnvironmentData(Properties properties, String xmlDataLocation)
           
LocalTestEnvironmentData(String xmlDataLocation)
           
 
Method Summary
 URL getBaseUrl()
           
 String getContext()
           
 String getEdition()
           
 File getJIRAHomeLocation()
           
 String getTenant()
          Returns the tenant to run requests on.
 File getWorkingDirectory()
          Returns a directory that can be used by the func tests whenever file operations need to be done.
 File getXMLDataLocation()
           
static Properties loadProperties(String key, String def)
           
 boolean shouldCreateDummyTenant()
          Whether a dummy tenant should be created after the tenant is created.
 
Methods inherited from class com.atlassian.jira.webtests.util.AbstractEnvironmentData
getEnvironmentProperty, getProperty, getReleaseInfo, getSingleTestClass, isAllTests, isBlame, isBundledPluginsOnly, isSingleNamedTest, isTpmLdapTests
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalTestEnvironmentData

public LocalTestEnvironmentData()

LocalTestEnvironmentData

public LocalTestEnvironmentData(String xmlDataLocation)

LocalTestEnvironmentData

public LocalTestEnvironmentData(Properties properties,
                                @Nullable
                                String xmlDataLocation)
Method Detail

loadProperties

public static Properties loadProperties(String key,
                                        String def)

getContext

public String getContext()

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 com.atlassian.jira.testkit.client.JIRAEnvironmentData
Overrides:
getTenant in class AbstractEnvironmentData
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 com.atlassian.jira.testkit.client.JIRAEnvironmentData
Overrides:
shouldCreateDummyTenant in class AbstractEnvironmentData
Returns:
true if a dummy tenant should be created after the tenant is created.

getBaseUrl

public URL getBaseUrl()

getXMLDataLocation

public File getXMLDataLocation()

getWorkingDirectory

public File getWorkingDirectory()
Description copied from interface: JIRAEnvironmentData
Returns a directory that can be used by the func tests whenever file operations need to be done.

This directory is guaranteed to not be used by other func test instances simultaneously running on the same machine in Bamboo.

This should return a canonical file name (ie an absolute file name, without any '..' parts in it).

Returns:
a directory that can be used by the func tests whenever file operations need to be done.
See Also:
File.getCanonicalFile()

getJIRAHomeLocation

public File getJIRAHomeLocation()
Returns:
a directory that can be used by the func tests whenever file operations need to be done.

getEdition

public String getEdition()
Specified by:
getEdition in class AbstractEnvironmentData


Copyright © 2002-2013 Atlassian. All Rights Reserved.