Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Its fields specify the properties of a test execution item that Zephyr will create for a test run:  

Anchor
table
table

Field 

Description 

status 

A string that specifies the test status. Can be an arbitrary string. Typical values are Passed, OK, Failed, Failure, and so on. For more information, on how Zephyr checks if a test failed or not, see below. 

statusExistPass 

An additional indicator of the test status. Can be true or false. For more information, on how Zephyr treats this field value, see below. 

statusString 

An expected value for the status field. Zephyr users this field to check if a test failed or not. See below. 

statusFailAttachment 

An additional description of test results used when a test failed. Typically, has an extended error message or a call stack for a failed function. Zephyr saves this extended description to a file and then attaches this file to an automation item: 

statusPassAttachment 

An additional description of test results used when a test passed. Typically, has information on the test case name and execution time. Zephyr saves this extended description to a file and then attaches this file to an automation item. See the image above. 

packageName 

This property is used only if you commanded Zephyr to create a package-like hierarchy of test execution items. The property specifies the name of the last level in the hierarchy. 

testcase
    name 

The name of the executed test case. Will be displayed in the Name column of the Test Execution screen in Zephyr. 

tag

A string of tags set for the test in the test results file. Zephyr pulls these values, parses and adds them to your test case. You will see them in the Tags attribute of the test case.

Test results can have one or multiple tags:

  • One tag:

Code Block
<testcase>
  ... 
  <tag>sample1</tag>
  ...
</testcase>
  • Multiple tags:

Code Block
<testcase>
  ... 
  <tags>
    <tag>sample1</tag>
    <tag>sample2</tag>
  </tags>
  ...
</testcase>

Depending on the format of test results, you use different patterns to parse the tag values:

Expand
titleOne tag

Sample contents of the results .xml file:

<testsuite>
<testcase>
...
<tag>sample1</tag>
...
</testcase>
</testsuite>

Parser template (as you can see, it is similar to patterns used for other elements):

tag: "${testsuite.testcase.tag}"

Expand
titleMultiple tags

Sample contents of the results .xml file:
<testsuite>
<testcase>
...
<tags>
<tag>sample1</tag>
<tag>sample2</tag>
</tags>
...
</testcase>
</testsuite>

You need to combine the tags/tag values into a single string to assign it to the tag item. To do this, you use the group_concat(…) function. It has the following parameters:

group_concat(path.to.parent.element, child-element, 'separator')

For example:

tag: ${group_concat(testsuite.testcase.tags, tag, ' ')}

The pattern above will extract tags/tag values, concatenate them into a single string and use spaces as a separator. A Zephyr test case will get the following Tags attribute: sample1 sample2.

The default parser template has a tag pattern for parsing tags from Cucumber test results. If you use another framework or tool to run your tests, please change the template accordingly.

The Tags attribute of a Zephyr test case is limited to 4,000 characters.

skipTestcaseNames 

An XML file can have information on one or multiple test cases. By default, Zephyr will create a test execution item for every test case it finds in the XML file. 

This field is a string of test case names that which Zephyr will skip and for which it will not create a test run item. 

The names are case-sensitive. Separate multiple test case names with a comma. Don’t put extra spaces around test case names. 

requirements
    id 

An array of requirement IDs or alternative IDs with which a test run is linked. IDs should start with the ID_ prefix, for example, ID_17 or ID_74. Alternative IDs start with the AltID_ prefix, for instance, AltID_MYPROJ-234 or AltID_simpleTest.  Often, alternative IDs are used to indicate the Jira ticket to which a requirement relates, so the AltID_ string includes the project name and ID of that Jira ticket.

attachments
    filePath 

An array that specifies additional files to be attached to the item. You should specify the path in terms of the computer, where the test ran. The path can be relative or absolute. If you use a relative file name, then it should be relative to the folder, where the test result XML file is located. 

...