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

API documentation
REST API basics
Authorization methods
Integration testing
Regression testing

  1. Basic test syntax - pm.expect and pm.response GET https://postman-echo.com/get?foo1=bar1&foo2=bar2

  2. API tests - Response time PUT https://postman-echo.com/put

  3. API tests - Data type PATCH https://postman-echo.com/patch

  4. API tests - newPatient Copy POST http://127.0.0.1:5001/my-clinic-2de14/us-central1/app/login

  5. API tests - Functional2 DELETE https://postman-echo.com/delete

  6. API tests - JSON schema v4 validation GET https://postman-echo.com/get?foo1=bar1&foo2=bar2

  7. API tests - SQL injection security check POST https://postman-echo.com/post