Test Case Writing Guidelines and Examples - Postman
Postman is an API platform for building and using APIs. This document shows how to writing a Postman test case in Testany.
Note: The voice in this video is AI-generated, not original.
Test case package - one zip file
Currently we only support uploading your local zip file to Testany. The zip file should follow this structure:
my-postman-test.zip
└── collection.json ← Postman collection file (required, only ONE .json allowed)
Registration settings:
Postman executor only supports a single .json collection file. If you need environment variables, configure them in the Environment Variables section on the test case detail page.
The zip file needs to contain at least one file:
-
Test case code file, like
hello-postman.postman_collection.jsonhello-postman.postman_collection.jsonJSON{ "info": { "_postman_id": "2c19e161-6009-4237-8643-9c6df5b0c596", "name": "hello-postman", "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json", "_exporter_id": "549544" }, "item": [ { "name": "website-active-check", "event": [ { "listen": "test", "script": { "exec": [ "pm.test(\"Status code is 200\", function(){", " pm.response.to.have.status(200);", "})" ], "type": "text/javascript" } } ], "request": { "method": "GET", "header": [], "url": { "raw": "{{URL}}", "host": [ "{{URL}}" ] } }, "response": [] } ] }
Environment Variables Configuration
The Postman variables used in your collection (e.g., {{URL}}) must be configured in both places:
- Test Case detail page → Environment Variables section: Define
URLand its value (e.g.,https://api.example.com) - Postman collection: Use
{{URL}}syntax to reference the variable
Testany automatically passes Environment Variables to Postman during execution. See Managing Test Case for details.
zip all the related files as one zip file, in this case the test case package file is postman-test.zip

After you've successfully prepared the .zip file, you will be able to go to register your test case on Testany Platform. Please refer to
×
Still have questions?
Our team is here to help. Get in touch and we'll get back to you as soon as possible.