0

I can update execution status by /rest/zapi/latest/execution/${ExecutionId}/execute, So I want to upload zip file as test result using Version and Test Cycle that Test Cycles are organised by version and project in Zephyr I try

${PathFile}    Set Variable  ${CURDIR}/Results/TC.zip
${file_data}  Get Binary File   ${PathFile}
${files}  Create Dictionary     file=${file_data}
${headers}    create dictionary    Content-Type=multipart/form-data    Authorization=Basic ${userpass}
create session    jira    ${jiraserver}  verify=True
${response}=    PUT On Session      alias=jira    url=/rest/zapi/latest/execution/${ExecutionId}/execute    headers=${headers}   files=${files}

But I got error "ChunkedEncodingError: ("Connection broken: InvalidChunkLength(got length b'', 0 bytes read)", InvalidChunkLength(got length b'', 0 bytes read))" Could someone share the steps and code that would allow me to upload the zip file?

Sawitree Cha
  • 189
  • 1
  • 4
  • 26
  • requests's `files` kwarg seems to expect a open filehandle and you are you are trying to pass the actual contents of the data .. I'd try to pass that via `data` – rasjani Jul 05 '23 at 11:03

0 Answers0