com.atlassian.jira.functest.framework.util.env
Class EnvironmentUtils

java.lang.Object
  extended by com.atlassian.jira.functest.framework.AbstractFuncTestUtil
      extended by com.atlassian.jira.functest.framework.util.env.EnvironmentUtils
All Implemented Interfaces:
FuncTestLogger

public class EnvironmentUtils
extends AbstractFuncTestUtil

Utility methods for environment settings JIRA runs in.

Since:
v3.13

Field Summary
static float JDK_1_5_VERSION
           
 
Fields inherited from class com.atlassian.jira.functest.framework.AbstractFuncTestUtil
environmentData, FS, locators, logger, logIndentLevel, tester
 
Constructor Summary
EnvironmentUtils(net.sourceforge.jwebunit.WebTester tester, com.atlassian.jira.webtests.util.JIRAEnvironmentData environmentData)
           
EnvironmentUtils(net.sourceforge.jwebunit.WebTester tester, com.atlassian.jira.webtests.util.JIRAEnvironmentData environmentData, Navigation navigation)
           
 
Method Summary
 float getJiraJavaVersion()
          Retrieves the version of Java being used to run the JIRA instance from the System Info page.
static String getMavenAwareOutputDir()
          This will return a directory that can be used to place file output from func tests.
 String getSystemInfoProperty(String propertyLabel)
           
 boolean isJavaBeforeJdk15()
           
 boolean isOnWindows()
          Checks if this instance of JIRA is running on Windows OS
 boolean isOracle()
           
 boolean isSunJVM()
           
 
Methods inherited from class com.atlassian.jira.functest.framework.AbstractFuncTestUtil
childLogIndentLevel, getAssertions, getEnvironmentData, getFuncTestHelperFactory, getLogger, log, log, navigation, submitAtPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JDK_1_5_VERSION

public static final float JDK_1_5_VERSION
See Also:
Constant Field Values
Constructor Detail

EnvironmentUtils

public EnvironmentUtils(net.sourceforge.jwebunit.WebTester tester,
                        com.atlassian.jira.webtests.util.JIRAEnvironmentData environmentData)

EnvironmentUtils

public EnvironmentUtils(net.sourceforge.jwebunit.WebTester tester,
                        com.atlassian.jira.webtests.util.JIRAEnvironmentData environmentData,
                        Navigation navigation)
Method Detail

isOnWindows

public boolean isOnWindows()
Checks if this instance of JIRA is running on Windows OS

Returns:
true if on Windows, false otherwise

getJiraJavaVersion

public float getJiraJavaVersion()
Retrieves the version of Java being used to run the JIRA instance from the System Info page. Method copied from JIRAWebTest.getJiraJavaVersion().

Returns:
the Java version as a float - e.g. Java 1.5 returns 1.5f (not 5.0f)

isSunJVM

public boolean isSunJVM()
Returns:
true if we're running a SUN JVM

isJavaBeforeJdk15

public boolean isJavaBeforeJdk15()
Returns:
true if the Java version determined by getJiraJavaVersion() precedes Java 1.5; false otherwise

getMavenAwareOutputDir

public static String getMavenAwareOutputDir()
This will return a directory that can be used to place file output from func tests. It tries to detect if Maven is being used and hence output to be placed in the target/test-reports directory otherwise it uses a temp directory. The directory is guaranteed to exist after this method returns.

Returns:
a directory that can be used for func test output

isOracle

public boolean isOracle()

getSystemInfoProperty

public String getSystemInfoProperty(String propertyLabel)


Copyright © 2002-2011 Atlassian. All Rights Reserved.