Forum Discussion

fede1's avatar
New Contributor
3 years ago

server version: uploading test results to Zephyr Scale via the automation API


I'm using Zepyhr Scale Server and I would like to upload to Zephyr the results of my automation testsuite made with pytest. I've tried this POST request: 

post(url="https://{my-jira-host}/rest/atm/1.0/automation/execution/{projectKey}", auth=({my_username}, {my_password}), files={"file":open("","rb")})

 but it doesn't work because the response is "errorMessages":["Invalid Custom Format JSON file"]}'.

I'm uploading a zip file containing one xml file generated with 

pytest --junitxml=output/junitxml_report.xml

as it's explained here

I've tried to make the same request with an API client (Postman) and the error is "Invalid ZIP file", even if I fail the authentication with a wrong username or even if I upload the xml file only.

Maybe someone does the same thing and could help me? I'm a newbie 🙂 thanks!

  • Support team answered me that there is no junit impor funcionality in server version, but only in cloud version.

    i implemented by myself parsing the xml and using server api to create-update test results.

10 Replies