public class TotalTestRunnerUtils extends Object
| Constructor and Description |
|---|
TotalTestRunnerUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
escapeForScript(String input,
boolean isShell)
Returns an escaped version of the given input String for a Batch or Shell script.
|
static String |
getHost(String hostPort)
Gets the host name;
|
static com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials |
getLoginInformation(hudson.model.Item project,
String credentialsId)
Retrieves login information given a credential ID
|
static String |
getPort(String hostPort)
Gets the port for the host connection.
|
static boolean |
isAllTestScenariosOrSuites(String testName)
Checks if the specified test name is ALL_SCENARIOS or ALL_SUITES
|
static boolean |
isTestNameList(String testSuiteEntry)
Checks if the test suite entry is a list of test scenario/suite names.
|
static void |
validateHostPort(hudson.model.TaskListener listener,
String hostPortValue)
Validate that there is a host and port defined.
|
public static String getHost(String hostPort)
hostPort - A string containing host:port.String the host namepublic static String getPort(String hostPort)
hostPort - A string containing host:port.String the portpublic static com.cloudbees.plugins.credentials.common.StandardUsernamePasswordCredentials getLoginInformation(hudson.model.Item project,
String credentialsId)
project - the Jenkins projectcredentialsId - The credendtial id for the user.public static void validateHostPort(hudson.model.TaskListener listener,
String hostPortValue)
listener - Task listenerhostPortValue - The host and port. Format(host:port)public static String escapeForScript(String input, boolean isShell)
input - the String to escapeisShell - true if the script is a Shell script, false if it is a Batch scriptStringpublic static boolean isAllTestScenariosOrSuites(String testName)
The check is case insensitive.
testName - The test name to check.true if either ALL_SCENARIOS or ALL_SUITES was specified, otherwise false.public static boolean isTestNameList(String testSuiteEntry)
testSuiteEntry - The test suite entry to check.true if the entry is a list, otherwise falseCopyright © 2016–2017. All rights reserved.