tm setresults
creates or edits test results for a test session
Synopsis
tm setresults [--sessionID=value] [--actionDefinition=value] [--actionDefinitionFile=value] [--hostname=value] [--port=value] [--password=value] [--user=value] [(-?|--usage)] [(-g|--gui)] [(-F value|--selectionFile=value)] [--quiet] [--settingsUI=[gui|default]] [--status=[none|gui|default]] [(-N|--no)] [(-Y|--yes)] [--[no]batch] [--cwd=value] [--forceConfirm=[yes|no]]
Description
This command creates or edits test results for a test session based on an action definition string or file. It is intended to be used for test automation or integrations with third party automated testing tools.
Options
This command takes the universal options available to
Integrity Lifecycle Manager commands, as well as some general options. See the
options reference page for descriptions.
• --sessionID=value
the ID of the test session item that the test cases belong to. The session ID must be specified either in this option or in the XML for --actionDefinition.
|
The test session must be in a state that allows test results to be created, and the test result policy for the session must allow the user to modify test results.
|
• --actionDefinition=value
the complete action definition for a single operation in formatted XML that conforms to a DTD. Use either this option or the --actionDefinitionFile option to define the test result operation to be performed.
The XML must conform to the following DTD:
<?xml version='1.0' encoding='UTF-8'?>
<!ELEMENT ActionList (SetResult)*>
<!ATTLIST ActionList
sessionID CDATA #IMPLIED>
<!ELEMENT SetResult (Verdict?,Annotation?,
(AddRelatedItem*|RemoveRelatedItem*|AddAttachment*|RemoveAttachment*|SetStepResult*)*)>
<!ATTLIST SetResult
caseID CDATA #REQUIRED>
<!ELEMENT Annotation (#PCDATA)>
<!ELEMENT AddAttachment (Description)?>
<!ATTLIST AddAttachment
name CDATA #IMPLIED
file CDATA #REQUIRED
<!ELEMENT RemoveAttachment EMPTY>
<!ATTLIST RemoveAttachment
name CDATA #REQUIRED>
<!ELEMENT Description (#PCDATA)
AddRelatedItemEMPTY>
<!ATTLIST AddRelatedItem
id CDATA #REQUIRED>
<!ELEMENT RemoveRelatedItem EMPTY>
<!ATTLIST RemoveRelatedItem
id CDATA #REQUIRED>
<!ELEMENT SetStepResult (Result?,Annotation?)>
<!ATTLIST SetStepResult
stepID CDATA #REQUIRED>
<!ELEMENT Verdict(#PCDATA)>
Example of an action definition XML file:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE ActionList SYSTEM "ActionList.dtd">
<ActionList sessionID="1">
<SetResult caseID="1">
<Verdict>
failed
</Verdict>
<Annotation> result annotation </Annotation>
<AddAttachment file="path/attachment1.gif" name="attachmentName">
<Description> attachment description </Description>
</AddAttachment>
<AddRelatedItem id="12"/>
<AddRelatedItem id="13"/>
<SetStepResult stepID="1">
<Verdict>
passed
</Verdict>
<Annotation>
this is step annotation
</Annotation>
</SetStepResult>
<SetStepResult stepID="2">
<Verdict>
failed
</Verdict>
<Annotation>
this is step annotation
</Annotation>
</SetStepResult>
</SetResult>
<SetResult caseID="2">
<Verdict>
passed
</Verdict>
<Annotation> annotation </Annotation>
<SetStepResult stepID="4">
<Verdict>
passed
</Verdict>
<Annotation>
This is step annotation
</Annotation>
</SetStepResult>
<AddAttachment file="path/attachment2.gif" name="attachment2Name">
<Description> attachment description </Description>
</AddAttachment>
<RemoveAttachment name="screenshot2.jpeg"/>
<AddRelatedItem id="14"/>
<RemoveRelatedItem id="15"/>
</SetResult>
</ActionList>
• --actionDefinitionFile=value
the path to the action definition file. The action definition file can be an XML file only, or a zip file containing an XML file. If it is contained in a zip file, this command will automatically unzip the file in a temporary folder, look in the unzipped folder for the file with the same name as the zip file but with an xml extension, and use that as the action definition file. See the --actionDefinitionFile option for the correct format for the file.
See Also
• Commands:
tm createresult,
tm editresult,
tm viewresult,
tm extractattachments,
tm stepresults,
tm resulteditor,
tm deleteresult,
tm editresult,
tm testcases,
tm results,
tm viewuntested