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:
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!
Just checking as I notice that the documentation link you posted is for the Cloud version but you say you’re on the Server version. The APIs might not be interchangeable between the versions.
thanks for the answer! yes you’re right, I checked the cloud documentation because it’s written how to make the integration with pytest, and in the server documentation it isn’t reported. Is it impossible? but I used the server version API that I found here https://support.smartbear.com/zephyr-scale-server/api-docs/v1/
Glad that’s helped clear up part of the issue. I’ve not used the APIs that much, and not for what you’re trying to do but it seems to me that the API for server is generic and as long as you follow the syntax it should work. Has it worked for you?
If that’s working for you, and the JSON file you’re providing is in the correct format as mentioned in the documentation here (smartbeartm4j / tm4j-junit-integration — Bitbucket) then I’m sorry I can’t help. I’ve only used the APIs for GET functions and not very often.
One thing, I can clear up is the difference between the API endpoints using rest/atm/… and the ones using rest/tests/…
The atm ones are the public API endpoints of Zephyr Scale which are documented for public use.
The tests endpoints are the internal ones that ZS uses. So those are not meant for public use and thus are not documented publicly. They can be quite handy, if you are savvy enough to figure them out (because they return a lot more information - like internal ids and such - than the public endpoints) but you will always run the risk of running into undocumented changes in the API and not getting the same sort of support than you get for the official API (also, you can break stuff quite easily using these endpoints, so be careful).
As for the rest, I’m with MisterB , raise a feature request for the server API and in the meantime contact support directly to have them help you figure out, why your JUnit results do not have the right format.