API testing basics
Number of APIs: 7
🧪 Get started here
Qodex's powerful [scripting feature] helps you to write a range of API tests in JavaScript, including integration, regression, and contract tests.
This template demonstrates how to work with the Qodex basic test syntax to test a single HTTP API request.
🔖 How to use this template?
Step 1: Send requests
Send the sample requests and view the response and test results.
Step 2: Update the sample request URL
Replace the sample request URLs with your desired API endpoints.
Step 3: Customize tests
Customize the tests in the Tests
tab if needed. Don't forget to save your changes.
💪 Quick tips for writing tests
- Organize your test scenarios by grouping your requests in collections and folders, and naming them descriptively
- Document your API’s requirements using markdown in the descriptions
- Use variables to simulate more sophisticated user flows
- Common tests that will be run after every request can be added to collection-level tests or folder-level tests
💡Related templates
API documentation
REST API basics
Authorization methods
Integration testing
Regression testing
-
Basic test syntax - pm.expect and pm.response GET https://postman-echo.com/get?foo1=bar1&foo2=bar2
-
API tests - newPatient Copy POST http://127.0.0.1:5001/my-clinic-2de14/us-central1/app/login
-
API tests - Functional2 DELETE https://postman-echo.com/delete
-
API tests - JSON schema v4 validation GET https://postman-echo.com/get?foo1=bar1&foo2=bar2
-
API tests - SQL injection security check POST https://postman-echo.com/post