public final class TestLinkHelper extends Object
Modifier and Type | Method and Description |
---|---|
static void |
addCustomFieldEnvironmentVariableName(br.eti.kinoshita.testlinkjavaapi.model.CustomField customField,
Map<String,String> testLinkEnvVar)
Formats a custom field into an environment variable.
|
static hudson.EnvVars |
buildTestCaseEnvVars(TestCaseWrapper testCase,
br.eti.kinoshita.testlinkjavaapi.model.TestProject testProject,
br.eti.kinoshita.testlinkjavaapi.model.TestPlan testPlan,
br.eti.kinoshita.testlinkjavaapi.model.Build build,
hudson.model.BuildListener listener)
Creates EnvVars for a TestLink Test Case.
|
static String |
createReportSummary(Report testLinkReport,
Report previous)
Creates Report Summary.
|
static String |
createReportSummaryDetails(Report report,
Report previous)
Creates detailed Report Summary.
|
static Map<String,String> |
createTestLinkEnvironmentVariables(TestCaseWrapper testCase,
br.eti.kinoshita.testlinkjavaapi.model.TestProject testProject,
br.eti.kinoshita.testlinkjavaapi.model.TestPlan testPlan,
br.eti.kinoshita.testlinkjavaapi.model.Build build)
Creates a Map (name, value) of environment variables for a TestLink Test Case.
|
static String |
getExecutionStatusTextColored(br.eti.kinoshita.testlinkjavaapi.constants.ExecutionStatus executionStatus)
Retrieves the text for an execution status wrapped in html tags that add
color to the text.
|
static String |
getPlusSignal(int current,
int previous)
Prints the difference between two int values, showing a plus sign if the
current number is greater than the previous.
|
static void |
maybeAddSystemProperty(String systemProperty,
hudson.model.BuildListener listener)
Maybe adds a system property if it is in format
|
static void |
setTestLinkJavaAPIProperties(String testLinkJavaAPIProperties,
hudson.model.BuildListener listener)
Defines TestLink Java API Properties.
|
public static String getExecutionStatusTextColored(br.eti.kinoshita.testlinkjavaapi.constants.ExecutionStatus executionStatus)
executionStatus
- the execution status.public static void setTestLinkJavaAPIProperties(String testLinkJavaAPIProperties, hudson.model.BuildListener listener)
Defines TestLink Java API Properties. Following is the list of available properties.
testLinkJavaAPIProperties
- listener
- Jenkins Build listenerpublic static void maybeAddSystemProperty(String systemProperty, hudson.model.BuildListener listener)
systemProperty
- System property entry in format listener
- Jenkins Build listenerpublic static Map<String,String> createTestLinkEnvironmentVariables(TestCaseWrapper testCase, br.eti.kinoshita.testlinkjavaapi.model.TestProject testProject, br.eti.kinoshita.testlinkjavaapi.model.TestPlan testPlan, br.eti.kinoshita.testlinkjavaapi.model.Build build)
testCase
- TestLink test Case.testProject
- TestLink Test Project.testPlan
- TestLink Test Plan.build
- TestLink Build.public static void addCustomFieldEnvironmentVariableName(br.eti.kinoshita.testlinkjavaapi.model.CustomField customField, Map<String,String> testLinkEnvVar)
Formats a custom field into an environment variable. It appends TESTLINK_TESTCASE in front of the environment variable name.
So, for example, the custom field which name is Sample Custom Field and value is Sample Value, will be added into the environment variables as TESTLINK_TESTCASE_SAMPLE__CUSTOM_FIELD="Sample Value" (note for the double spaces).
If the custom's value contains commas (,), then this method splits the value and, for each token found, it creates a new environment variable appending a numeric index after its name
So, for example, the custom field which name is Sample Custom Field and value is Sample Value 1, Sample Value 2, will generate three environment variables: TESTLINK_TESTCASE_SAMPLE_CUSTOM_FIELD="Sample Value 1, Sample Value 2", TESTLINK_TESTCASE_SAMPLE_CUSTOM_FIELD_0="Sample Value 1" and TESTLINK_TESTCASE_SAMPLE_CUSTOM_FIELD_1="Sample Value 2".
customField
- The custom fieldtestLinkEnvVar
- TestLink envVarspublic static hudson.EnvVars buildTestCaseEnvVars(TestCaseWrapper testCase, br.eti.kinoshita.testlinkjavaapi.model.TestProject testProject, br.eti.kinoshita.testlinkjavaapi.model.TestPlan testPlan, br.eti.kinoshita.testlinkjavaapi.model.Build build, hudson.model.BuildListener listener)
testCase
- TestLink test CasetestProject
- TestLink Test ProjecttestPlan
- TestLink Test Planbuild
- TestLink Buildlistener
- Hudson Build Listenerpublic static String createReportSummary(Report testLinkReport, Report previous)
testLinkReport
- TestLink Reportprevious
- Previous TestLink Reportpublic static String createReportSummaryDetails(Report report, Report previous)
report
- TestLink reportprevious
- Previous TestLink reportpublic static String getPlusSignal(int current, int previous)
current
- Current valueprevious
- Previous valueCopyright © 2010-2013 Jenkins. All Rights Reserved.