Class ATXUtil


  • public final class ATXUtil
    extends Object
    Utility class providing ATX related functions.
    • Method Detail

      • getValidATXName

        public static String getValidATXName​(String testName)
        Removes special characters from test name and replaces with underscore "_".
        Parameters:
        testName - the test name
        Returns:
        the ATX compliant test name
      • getBaseUrl

        @CheckForNull
        public static String getBaseUrl​(ATXConfig config,
                                        EnvVars envVars)
        Gets the server base URL of the ATX installation. Parameterized settings are expanded by given environment variables.
        Parameters:
        config - the ATX configuration
        envVars - the environment variables
        Returns:
        the ATX base URL or null if invalid URL
      • getBaseUrl

        public static String getBaseUrl​(String serverUrl,
                                        String serverPort,
                                        String contextPath,
                                        boolean useHttpsConnection)
        Gets the base URL of the ATX installation by given server settings.
        Parameters:
        serverUrl - the server URL
        serverPort - the server port
        contextPath - the context path
        useHttpsConnection - specifies whether to use secured connection
        Returns:
        the ATX base URL or null if invalid URL
      • getProxyUrl

        @CheckForNull
        public static String getProxyUrl​(ATXConfig config,
                                         EnvVars envVars)
        Gets the proxy URL of the ATX installation. Parameterized settings are expanded by given environment variables.
        Parameters:
        config - the ATX configuration
        envVars - the environment variables
        Returns:
        the ATX base URL or null if invalid URL
      • getProjectId

        public static String getProjectId​(ATXConfig config,
                                          EnvVars envVars)
        Gets the current ATX project id.
        Parameters:
        config - the ATX configuration
        envVars - the environment variables
        Returns:
        the project id, null if setting is not available
      • isSingleTestplanMap

        public static boolean isSingleTestplanMap​(ATXConfig config)
        Returns the current ATX setting mapSeparateProjectExecutionAsSingleTestplan.
        Parameters:
        config - the ATX configuration
        Returns:
        the value of this setting as boolean, true by default if setting not exists