Forum Discussion

Neethu_VP's avatar
Neethu_VP
New Contributor
1 year ago

Attach Files in a test cycle

Recently we moved to Jira Cloud. I'm trying to upload a file after creating test cycle. 

test cycle creation and testcase status update is working fine. But I'm unable to uploadfiles into cycle. I tried using "custom" execution API's. But no success.

The file upload was working fine in server and i used /testresult/{testResultId}/attachments format.

Is there any way we can upload files in to an execution. 

I'm using https://api.zephyrscale.smartbear.com/v2/automations/executions/custom

 

2 Replies

    • dsilvautoeurope's avatar
      dsilvautoeurope
      New Contributor

      For people that might be struggling like I was yesterday. The solution for this is:
      You need to send a .zip file, not a .json file. The .json file needs to be "zipped", and .json structure should be something like this:

      {
        "version": 1,
        "executions": [
          {
            "result": "Pass",
            "testCase": {
              "key": "AB-T312"
            }
          },
          {
            "result": "Pass",
            "testCase": {
              "key": "AB-T313"
            }
          }
        ]
      }

      Leave a thumbs up if I helped. :D