CLI Reference > Workflows and Documents Commands > tm createresult
  
tm createresult
creates test results for the specified test cases
Synopsis
tm createresult [--sessionID=value] [--addAttachment=value] [--addRelatedItem=[FieldName]:ItemID[relationshipFlags][,...]] [--verdict=value] [--stepVerdict=stepID=value[:verdict=value][:annotation=value]] [--annotation=value] [--[no]forceEdit] [--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]] caseID|versionedSuiteID:versionedCaseID...
Description
This command allows you to record the same test results for a group of test cases in a test session. The test results are created with the same result, annotation, attachments and related items.
For example,
tm createresult --sessionID=8017 --verdict=Passed --annotation="Works as designed" 9075 9025 9001
creates test results with a verict of Passed and a annotation of Works as designed for test cases 9075, 9025 and 9001 in test session 8017.
This command reports status (progress) from the server and you can cancel the operation. If you cancel the command, no test results are created.
Options
This command takes the universal options available to Windchill RV&S commands, as well as some general options. See the options reference page for descriptions.
* 
Use the tm createresults command without the --gui option to create results for versioned test cases. The tm createresults command with the --gui option does not support versioned test cases.
--sessionID=value
the ID of the test session that the test cases belong to. This option is mandatory.
* 
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.
--addAttachment=value
adds attachments, where value is of the form "field=fieldName,path=pathToFile[,name=nameOfAttachment][,summary=shortDescription] " .
* 
The "pathToFile" must include the path and filename. The "nameOfAttachment" is optional, and gives the attachment a different name than the name of the file specified in "pathToFile".
For example,
addAttachment="field=Attachments,path=c:/temp/notes.txt,name=notes123.txt,summary="Notes for issue 123""
adds the existing notes.txt file as an attachment with the name of notes123.txt.
If you do not specify the name of the attachment, the file name is used as the attachment name. You can use this option multiple times to specify multiple attachments. A test result cannot have more than one attachment with the same name.
* 
Attachment size limits are set by your administrator. The default attachment size limit is 4 MB.
--addRelatedItem=[FieldName]:ItemID[relationshipFlags][,...]
the related items to add to the test results for the specified test cases.
If no field name is specified, the Forward Relationships field is used. You can use this option multiple times to specify multiple related items.
Related items are created as a result of test case failure.
* 
Adding a related item is only permitted if your administrator has allowed relationships for the item type.
--verdict=valuethe outcome of the test cases, for example, passed, failed, or skipped. Contact your administrator for the available values for this option.
* 
If no verdict is specified, the pre-definedunspecified verdict is used.
--stepVerdict=stepID=value[:verdict=value][:annotation=value]
the outcome of the test case steps, for example, passed, failed, or skipped. Contact your administrator for the available values for this option. If required, you can also specify an annotation for the test case step.
If you are creating results for more than one test step, you must specify the ID of the test step or the command will fail.
You can use this option multiple times to specify the verdict and annotation for multiple steps.
* 
If an annotation is specified but no verdict is specified, the pre-defined unspecified verdict is used.
--annotation=value
notes about the test results, for example, reasons for test failure.
* 
Annotations are limited to 4000 characters.
--[no]forceEdit
if the test result being created already exists, edits it based on the new result. Forced edit should be used when automatically creating test results using the setresults command.
caseID|versionedSuiteID:versionedCaseID...
specifies the test case IDs to create test results for. The test cases must all belong to the session specified in the --sessionID option. If there is a test case that already had a result in the specified session and --forceEdit option is not used, the command will fail.
As of Integrity Lifecycle Manager 12.0, you can also specify versioned test case IDs to create test results for. When specifying a versioned test case ID, ensure that the versioned test case ID is prefixed with versioned test suite ID it belongs to, using a colon separator.
For example,
tm createresult --verdict="FAILED" --sessionID=1393 853-3.0:856-6.0
creates test result with verdict of Failed for the versioned test case 856-6.0 belonging to versioned test suite 853-3.0 in test session 1393.
* 
You can use the output of the tm testcases command to view the test cases present in a test session.
See Also
Commands: tm results, tm editresult, tm viewresult, tm extractattachments, tm stepresults, tm resulteditor, tm deleteresult, tm editresult, tm testcases, tm setresults, tm viewuntested
Miscellaneous: options