Class LocalTestEnvironmentData

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

public class LocalTestEnvironmentData extends AbstractEnvironmentData
  • Field Details

  • Constructor Details

    • LocalTestEnvironmentData

      public LocalTestEnvironmentData()
    • LocalTestEnvironmentData

      public LocalTestEnvironmentData(String xmlDataLocation)
    • LocalTestEnvironmentData

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

    • loadProperties

      public static Properties loadProperties(String key, String def)
    • 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 com.atlassian.jira.testkit.client.JIRAEnvironmentData
      Specified by:
      getProperty in interface JIRAEnvironmentData
      Overrides:
      getProperty in class AbstractEnvironmentData
      Parameters:
      key - the property key
      Returns:
      a property from the test environment, or null if not available.
    • 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
      Specified by:
      getTenant in interface 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
      Specified by:
      shouldCreateDummyTenant in interface 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:
    • 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