Versions Compared

Key

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

...

...

Panel
panelIconIdatlassian-info
panelIcon:info:
bgColor#FFBDAD

Starting October 11, 2024 (Zephyr Enterprise 8.2), the Zephyr Enterprise documentation moved from its current location on Atlassian to a dedicated, standalone Zephyr Enterprise documentation page. Please see: https://support.smartbear.com/zephyr-enterprise/docs/en/migrating-to-zephyr-enterprise/via-rest-api/create-a-test-case-tree.html

Table of Contents

Create a folder or phase

...

Code Block
languagejson
{
  "tcrCatalogTreeId": 18,
  	"testcase": {
    		      "name": "Testcase in Sub-Folder"
                    }
}

tcrCatalogTreeId - the ID of the folder where you want to create the test case.

...

Expand
titleUpload the file using a cURL command

1. Download cURL and extract the zip file.

2. Open the command prompt and navigate to the src folder containing the curl.exe executable:

3. Run the following cURL command:

curl -i -X POST -H "Content-Type: multipart/form-data" -F "data=@<file path>" http://<ip>/flex/upload/document/genericattachment

<file path> - the location of the file to be uploaded.

<ip> - the IP address of the server.

Example: curl -i -X POST -H "Content-Type: multipart/form-data" -F "data=@C:/Users/Praveenkumar/Downloads/js1.pdf" http://52.74.143.162/flex/upload/document/genericattachment

4. The above-mentioned command will return the temporary location of the uploaded file in the JSON format. You will use this path in the request body when sending a request.

Image RemovedImage Added

Example: file":"/opt/zephyr/nodedata/temp/1486648889167_29/js1.pdf"

...

http://<server-ip>/flex/services/rest/latest/attachment/list

...

Request body

Code Block
[{
   "name": "js1.pdf",
   "itemId": 553,
   "itemType": "testcase",
   "contentType": "application/octet-stream",
   "tempPath": "%2F1522663583732_106%2Fjs1.pdf"
}]

tempPath - the path to the uploaded file.

...