Skip to content

Testnizer v1.4.18

Choose a tag to compare

@apinizerdev apinizerdev released this 10 Jun 17:11
· 10 commits to main since this release

v1.4.18

Scripting levels up: built-in OAuth 2.0 tokens (no more hand-scripted token
requests), pm.sendRequest, response cookies in scripts, and the same script
runtime in Send and Run. Plus a rewritten Scripts guide on the website.

  • Built-in OAuth 2.0 token grant: the OAuth 2.0 auth type now actually
    fetches a token. Pick Client Credentials or Password grant, fill in
    the token URL / client id / secret / scope, and Testnizer requests the token
    automatically before the request and caches it until it nears expiry. The
    Get New Access Token button works too. Combined with folder/project auth
    inheritance, you can set OAuth 2.0 once on a folder and every request below it
    gets a fresh token — no token-fetch request or script required.
  • pm.sendRequest: scripts can now fire an auxiliary HTTP request
    mid-script — await pm.sendRequest(...) or the Node-style callback. Useful for
    token fetch, polling, and setup. Works in both Send and the Collection Runner.
  • Response cookies in scripts: pm.response.cookies.get('session')
    (.has, .toObject) reads the cookies the server set.
  • pm.*.toObject() snapshots for environment / globals /
    collectionVariables / variables.
  • Send / Run script parity: the Collection Runner now exposes the same
    globals as Send — CryptoJS and the t alias. A script using
    CryptoJS.HmacSHA256(...) that passed on Send used to throw "CryptoJS is not
    defined" on Run; both run identically now.
  • Scripts are async: you can await inside pre-request and test scripts.
  • Docs: the Scripts guide was
    rewritten to match the real runtime — CryptoJS instead of the (unsupported)
    require(), the full pm API, the project → folder → request script cascade,
    auth inheritance, and built-in OAuth 2.0.

Tests: OAuth2 grant (client_credentials / password / client-auth modes),
pm.sendRequest (Send + Run, await + callback), response cookies, toObject, and
runner CryptoJS/t parity. Unit suite now at 1758.