|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthudson.plugins.testlink.util.TestLinkHelper
public final class TestLinkHelper
Helper methods for TestLink.
Method Summary | |
---|---|
static void |
addCustomFieldEnvironmentVariableName(br.eti.kinoshita.testlinkjavaapi.model.CustomField customField,
java.util.Map<java.lang.String,java.lang.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 java.lang.String |
createReportSummary(Report testLinkReport,
Report previous)
Creates Report Summary. |
static java.lang.String |
createReportSummaryDetails(Report report,
Report previous)
Creates detailed Report Summary. |
static java.util.Map<java.lang.String,java.lang.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 java.lang.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 java.lang.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(java.lang.String systemProperty,
hudson.model.BuildListener listener)
Maybe adds a system property if it is in format |
static void |
setTestLinkJavaAPIProperties(java.lang.String testLinkJavaAPIProperties,
hudson.model.BuildListener listener)
Defines TestLink Java API Properties. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getExecutionStatusTextColored(br.eti.kinoshita.testlinkjavaapi.constants.ExecutionStatus executionStatus)
executionStatus
- the execution status.
public static void setTestLinkJavaAPIProperties(java.lang.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(java.lang.String systemProperty, hudson.model.BuildListener listener)
systemProperty
- System property entry in format listener
- Jenkins Build listenerpublic static java.util.Map<java.lang.String,java.lang.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, java.util.Map<java.lang.String,java.lang.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 Listener
public static java.lang.String createReportSummary(Report testLinkReport, Report previous)
testLinkReport
- TestLink Reportprevious
- Previous TestLink Report
public static java.lang.String createReportSummaryDetails(Report report, Report previous)
report
- TestLink reportprevious
- Previous TestLink report
public static java.lang.String getPlusSignal(int current, int previous)
current
- Current valueprevious
- Previous value
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |