Forum Discussion

fede1's avatar
fede1
New Contributor
3 years ago
Solved

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

Hello!

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("test_results.zip","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 https://support.smartbear.com/zephyr-scale-cloud/docs/test-automation/pytest-integration.html

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