Class ATXUtil
- java.lang.Object
-
- de.tracetronic.jenkins.plugins.ecutest.util.ATXUtil
-
public final class ATXUtil extends Object
Utility class providing ATX related functions.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getBaseUrl(ATXConfig config, EnvVars envVars)
Gets the server base URL of the ATX installation.static String
getBaseUrl(String serverUrl, String serverPort, String contextPath, boolean useHttpsConnection)
Gets the base URL of the ATX installation by given server settings.static String
getProjectId(ATXConfig config, EnvVars envVars)
Gets the current ATX project id.static String
getProxyUrl(ATXConfig config, EnvVars envVars)
Gets the proxy URL of the ATX installation.static String
getValidATXName(String testName)
Removes special characters from test name and replaces with underscore "_".static boolean
isSingleTestplanMap(ATXConfig config)
Returns the current ATX settingmapSeparateProjectExecutionAsSingleTestplan
.
-
-
-
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 configurationenvVars
- 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 URLserverPort
- the server portcontextPath
- the context pathuseHttpsConnection
- 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 configurationenvVars
- 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 configurationenvVars
- the environment variables- Returns:
- the project id,
null
if setting is not available
-
isSingleTestplanMap
public static boolean isSingleTestplanMap(ATXConfig config)
Returns the current ATX settingmapSeparateProjectExecutionAsSingleTestplan
.- Parameters:
config
- the ATX configuration- Returns:
- the value of this setting as boolean,
true
by default if setting not exists
-
-