Class TestResult
java.lang.Object
fi.meliora.testlab.ext.rest.model.ModelObject
fi.meliora.testlab.ext.rest.model.TestResult
- All Implemented Interfaces:
Serializable
Encapsulates inbound results of a single test run.
- Author:
- Marko Kanala
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDeprecated.Values to set to test case parameters if any.getTags()
Deprecated.getUser()
getXml()
Deprecated.void
setAddIssueStrategy
(TestResult.AddIssueStrategy addIssueStrategy) When to add issues for failed results.void
setAssignIssuesToUser
(String assignIssuesToUser) Assign added issues to this user if the user is found in the project.void
setAutomationSourceId
(Long automationSourceId) void
setAutomationSourceTitle
(String automationSourceTitle) void
setChangesets
(List<Changeset> changesets) Changesets the test result relates to.void
setCulprits
(List<String> culprits) Culprits for the possible failure, if any.void
setDescription
(String description) Description for the test run.void
setImportTestCases
(Boolean importTestCases) Deprecated.void
setImportTestCasesRootCategory
(String importTestCasesRootCategory) Deprecated.void
setMilestoneId
(Long milestoneId) Id of the milestone for the test run and issues.void
setMilestoneIdentifier
(String milestoneIdentifier) Identifier of the milestone for the test run and issues.void
setMilestoneTitle
(String milestoneTitle) Title of the milestone for the test run and issues.void
setParameters
(List<KeyValuePair> parameters) void
setProjectId
(Long projectId) Id of the project to add the test results to.void
setProjectKey
(String projectKey) Key of the project to add the test results to.void
setReopenExistingIssues
(Boolean reopenExistingIssues) Set to true to reopen existing issues in Testlab if found.void
setResultName
(String resultName) Optional.void
setResults
(List<TestCaseResult> results) Results of individual test cases.void
setRobotCatenateParentKeywords
(Boolean robotCatenateParentKeywords) If true, when the xml provided is in Robot Framework format and in the xml keyword has sub keywords, the sub keywords are catenated to a single step in the result.void
setRuleset
(String ruleset) Name of the ruleset to apply to these results.void
Tags for the test run.void
setTestCaseMappingField
(String testCaseMappingField) Deprecated.void
setTestEnvironmentId
(Long testEnvironmentId) Id of the test environment for the test run.void
setTestEnvironmentTitle
(String testEnvironmentTitle) Title of the test environment for the test run.void
setTestRunId
(Long testRunId) Id of the test run to update the test results to.void
setTestRunTitle
(String testRunTitle) Title of the test run to update the test results to.void
setTestTargetId
(Long testTargetId) Id of the test target (version) for the test run.void
setTestTargetTitle
(String testTargetTitle) Title of the test target (version) for the test run.void
Name of the user to execute Testlab operations with.void
JUnit compatible xml content for results.void
setXmlFormat
(String xmlFormat) Format for provided xml file.Methods inherited from class fi.meliora.testlab.ext.rest.model.ModelObject
toString, toString, toStringCut
-
Field Details
-
FORMAT_JUNIT
- See Also:
-
FORMAT_ROBOTFRAMEWORK
- See Also:
-
-
Constructor Details
-
TestResult
public TestResult()
-
-
Method Details
-
getProjectId
-
setProjectId
Id of the project to add the test results to. If null, projectKey is used.- Parameters:
projectId
- projectId
-
getProjectKey
-
setProjectKey
Key of the project to add the test results to. Optional if projectId is set.- Parameters:
projectKey
- project prefix / key
-
getRuleset
-
setRuleset
Name of the ruleset to apply to these results. Test result rulesets are configured in the "Test automation" UI in Testlab. If not set, a default ruleset for the project is used.- Parameters:
ruleset
- name of the ruleset
-
getTestRunId
-
setTestRunId
Id of the test run to update the test results to. If null, testRunTitle is used.- Parameters:
testRunId
- test run id
-
getTestRunTitle
-
setTestRunTitle
Title of the test run to update the test results to. Optional if testRunId is set.- Parameters:
testRunTitle
- test run title
-
setAutomationSourceId
-
getAutomationSourceId
-
setAutomationSourceTitle
- Parameters:
automationSourceTitle
- Source of test results
-
getAutomationSourceTitle
-
getDescription
-
setDescription
Description for the test run. If test run exists and description is left as null the description of TestRun at Testlab is left as it is.- Parameters:
description
- comment
-
getUser
-
setUser
Name of the user to execute Testlab operations with.- Parameters:
user
- user name
-
getMilestoneId
-
setMilestoneId
Id of the milestone for the test run and issues. If null, milestoneIdentifier and milestoneTitle are used.- Parameters:
milestoneId
- milestone id
-
getMilestoneIdentifier
-
setMilestoneIdentifier
Identifier of the milestone for the test run and issues. If null, milestoneTitle is used.- Parameters:
milestoneIdentifier
- milestone identifier
-
getMilestoneTitle
-
setMilestoneTitle
Title of the milestone for the test run and issues.- Parameters:
milestoneTitle
- milestone title
-
getTestTargetId
-
setTestTargetId
Id of the test target (version) for the test run. If null, testTargetTitle is used.- Parameters:
testTargetId
- test target id
-
getTestTargetTitle
-
setTestTargetTitle
Title of the test target (version) for the test run. Optional if testTargetId is set.- Parameters:
testTargetTitle
- test target title
-
getTestEnvironmentId
-
setTestEnvironmentId
Id of the test environment for the test run. If null, testEnvironmentTitle is used.- Parameters:
testEnvironmentId
- test environment id
-
getTestEnvironmentTitle
-
setTestEnvironmentTitle
Title of the test environment for the test run. Optional if testEnvironmentId is set.- Parameters:
testEnvironmentTitle
- test environment title
-
getTags
-
setTags
Tags for the test run. Optional. Separate multiple tags with spaces ("tag1 tag2 tag3 ...").- Parameters:
tags
- a list of tags
-
getTestCaseMappingField
Deprecated. -
setTestCaseMappingField
Deprecated.Title of the custom field to use to map the test cases from the project. Optional if results are sent with actual testCaseId values set. This value is case-insensitive.- Parameters:
testCaseMappingField
- test case mapping field
-
getResults
-
getParameters
Values to set to test case parameters if any.- Returns:
- parameters
-
setParameters
-
setResults
Results of individual test cases.- Parameters:
results
- results
-
getAddIssueStrategy
-
setAddIssueStrategy
When to add issues for failed results. Never, one issue per test run, one issue per Testlab test case, or one issue per test result- Parameters:
addIssueStrategy
- TestResult.AddIssueStrategy
-
getReopenExistingIssues
-
setReopenExistingIssues
Set to true to reopen existing issues in Testlab if found.- Parameters:
reopenExistingIssues
- Boolean
-
getAssignIssuesToUser
-
setAssignIssuesToUser
Assign added issues to this user if the user is found in the project.- Parameters:
assignIssuesToUser
- boolean
-
getXml
-
setXml
JUnit compatible xml content for results. If results are delivered in results field this field is ignored.- Parameters:
xml
- xml
-
isImportTestCases
Deprecated. -
setImportTestCases
Deprecated.If set implies that test cases which are not found via the mapping identifier should be automatically created during the push.- Parameters:
importTestCases
- boolean
-
getImportTestCasesRootCategory
Deprecated. -
setImportTestCasesRootCategory
Deprecated.If set, sets the root category path where the test cases are created. By default, "Import".- Parameters:
importTestCasesRootCategory
- boolean
-
getXmlFormat
-
setXmlFormat
Format for provided xml file. "junit" | "robot" - defaults to "junit".- Parameters:
xmlFormat
- format
-
isRobotCatenateParentKeywords
-
setRobotCatenateParentKeywords
If true, when the xml provided is in Robot Framework format and in the xml keyword has sub keywords, the sub keywords are catenated to a single step in the result. For example, if the robot result has
<pre> <kw name="Open site"> <kw name="Open URL"> <kw name="Navigate browser"> ... </kw> </kw> </kw> ... </pre>
.. the test case is added with a single step described as "Open site - Open URL - Navigate browser". When concatenating, if a step fails it is always included as a step.
If false, each sub keyword will generate a separate step to the result.
This value defaults to true.- Parameters:
robotCatenateParentKeywords
- boolean
-
getResultName
-
setResultName
Optional. If set, this will be used as a name for the results (file) added to Testlab. For example, this can be set as an URL (for example Jenkins job URL) or the name of the result file you are pushing the results from.- Parameters:
resultName
- result name
-
getCulprits
-
setCulprits
Culprits for the possible failure, if any.- Parameters:
culprits
- culprits
-
getChangesets
-
setChangesets
Changesets the test result relates to. For Testlab to react to these values, the VCS integration to be set up for the project for the Changeset to exist in the Testlab's database. If corresponding Changeset does not exist in Testlab, these values are ignored.- Parameters:
changesets
- changesets
-