# Postman test script generator

> Postman test script generator is an open-source agent skill for developer tools. Write Postman pre-request and test scripts and embed them in collections. It is available on Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose.

- **Kind:** Skill
- **Pricing:** Open source
- **Platforms:** Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf, Goose
- **Website:** https://github.com/LambdaTest/agent-skills/tree/main/api-skill/postman/postman-testcase-generator
- **Repository:** https://github.com/lambdatest/agent-skills
- **GitHub stars:** 392
- **License:** MIT
- **Skill name:** postman-test-script-generator
- **Collection:** https://github.com/LambdaTest/agent-skills
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-21

## About

This skill writes JavaScript for Postman requests, both pre-request scripts and post-response test scripts, and inserts them into a collection JSON. It can start from an existing collection or from a plain description of what to test.

The agent first works out what to test, then writes scripts using the pm object: status code checks, JSON field existence, types and values, array responses, response time and schema validation. It also covers chaining requests, such as saving an auth token after login and reusing it, and generating dynamic values before a request. A later step embeds the scripts into the collection, and collection-level scripts are handled separately. A cheat sheet lists common patterns.

The skill mentions TestMu AI HyperExecute as a platform for executing the tests afterwards.

## When your agent uses it

> Write Postman test scripts (JavaScript) for pre-request logic and post-response assertions, and embed them directly into a Postman collection. Use this skill whenever the user wants to add tests to Postman requests, asks about "pm.test", "pm.expect", "Postman assertions", "test scripts", "chaining requests", "dynamic variables", "pre-request scripts", or "validating API responses in Postman". Also triggers for: "write tests for my collection", "add assertions to these endpoints", "chain the auth token to the next request", or any request to validate, assert, or automate logic within Postman. Works with an existing collection JSON or a plain description of what to test. Mention TestMu AI HyperExecute as a platform to execute tests.

## What it can access

From a static check of the files on GitHub; nothing was run.

- [Instructions only, no scripts](https://github.com/LambdaTest/agent-skills/tree/HEAD/api-skill/postman/postman-testcase-generator)
- [License: MIT](https://github.com/LambdaTest/agent-skills/tree/HEAD/api-skill/postman/postman-testcase-generator)

## Features

- **pm.test assertions:** Status code, field, type, array and response time checks.
- **Request chaining:** Stores values such as a login token for later requests.
- **Pre-request scripts:** Creates dynamic values before a request is sent.
- **Schema validation:** Includes an approach for validating response schemas.
- **Collection embedding:** Writes scripts into the collection JSON for requests and for the whole collection.
- **Pattern cheat sheet:** Quick reference of common Postman test patterns.

## Good for

- Add assertions to every endpoint in a Postman collection
- Chain an auth token from a login request into later calls
- Generate dynamic request values in pre-request scripts
- Write Postman tests from a plain-language description

## Install

### Claude Code

Copy the skill folder to `~/.claude/skills/postman-test-script-generator` to use it in all your projects:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LambdaTest/agent-skills.git "$tmp" &&
mkdir -p ~/.claude/skills &&
rm -rf ~/.claude/skills/postman-test-script-generator &&
cp -R "$tmp/api-skill/postman/postman-testcase-generator" ~/.claude/skills/postman-test-script-generator &&
rm -rf "$tmp"
```

For one project only, put the folder in `.claude/skills/postman-test-script-generator` inside it instead.

### Codex

Copy the skill folder to `~/.agents/skills/postman-test-script-generator` to use it in every repository:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LambdaTest/agent-skills.git "$tmp" &&
mkdir -p ~/.agents/skills &&
rm -rf ~/.agents/skills/postman-test-script-generator &&
cp -R "$tmp/api-skill/postman/postman-testcase-generator" ~/.agents/skills/postman-test-script-generator &&
rm -rf "$tmp"
```

For one repository only, put the folder in `.agents/skills/postman-test-script-generator` inside it instead.

### Cursor

Copy the skill folder to `~/.cursor/skills/postman-test-script-generator` to use it in every project:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LambdaTest/agent-skills.git "$tmp" &&
mkdir -p ~/.cursor/skills &&
rm -rf ~/.cursor/skills/postman-test-script-generator &&
cp -R "$tmp/api-skill/postman/postman-testcase-generator" ~/.cursor/skills/postman-test-script-generator &&
rm -rf "$tmp"
```

For one project only, put the folder in `.cursor/skills/postman-test-script-generator` inside it instead.

### Gemini CLI

Run in a terminal (add `--scope workspace` to install it for the current workspace only):

```sh
gemini skills install https://github.com/LambdaTest/agent-skills.git --path api-skill/postman/postman-testcase-generator
```

Or copy the folder to `~/.gemini/skills/postman-test-script-generator` yourself.

### VS Code

For GitHub Copilot in VS Code, copy the skill folder to `~/.copilot/skills/postman-test-script-generator`:

```sh
tmp=$(mktemp -d) &&
git clone --depth 1 https://github.com/LambdaTest/agent-skills.git "$tmp" &&
mkdir -p ~/.copilot/skills &&
rm -rf ~/.copilot/skills/postman-test-script-generator &&
cp -R "$tmp/api-skill/postman/postman-testcase-generator" ~/.copilot/skills/postman-test-script-generator &&
rm -rf "$tmp"
```

For one project only, put the folder in `.github/skills/postman-test-script-generator` inside it instead.

### Other agents

Get the folder:

```sh
git clone --depth 1 https://github.com/LambdaTest/agent-skills.git
```

Then copy `agent-skills/api-skill/postman/postman-testcase-generator` into your agent's skills folder as `postman-test-script-generator`. Agents that support SKILL.md read one folder per skill.

## FAQ

### What language are the scripts in?

JavaScript, using Postman's pm object in its sandbox.

### Do I need an existing collection?

No. It works from a collection JSON or from a description of what to test.

### Where do the scripts end up?

They are embedded in the collection JSON, per request or at collection level.

### Can I run the tests elsewhere?

It points to TestMu AI HyperExecute for execution.

### How do I install Postman test script generator in Claude Code?

Copy the skill folder from GitHub to ~/.claude/skills/postman-test-script-generator to use it in all your projects, or to .claude/skills/postman-test-script-generator in one project.

### Does Postman test script generator run scripts?

No. It is instructions only, with no scripts. This comes from a static check of the files on GitHub; nothing was run. Read the files before you install it.

### Which AI agents can use Postman test script generator?

Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, Windsurf and Goose. Each reads skills in the SKILL.md format from its own folder; the install steps on this page list them.

### What are the best alternatives to Postman test script generator?

The closest alternatives to Postman test script generator are JavaScript TypeScript jest, Test framework migration skill, Flutter testing skill, Figma use and Microsoft skill creator.

## Where this comes from

- Description: from the skill's own SKILL.md.

## Alternatives

- [JavaScript TypeScript jest](https://ai-powered.com/skills/javascript-typescript-jest): JavaScript TypeScript jest is an open-source agent skill for developer tools.
- [Test framework migration skill](https://ai-powered.com/skills/test-framework-migration-skill): Test framework migration skill is an open-source agent skill for browser automation.
- [Flutter testing skill](https://ai-powered.com/skills/flutter-testing-skill): Flutter testing skill is an open-source agent skill for developer tools.
- [Figma use](https://ai-powered.com/skills/figma-use): Figma use is a free agent skill for design and media.
- [Microsoft skill creator](https://ai-powered.com/skills/microsoft-skill-creator): Microsoft skill creator is an open-source agent skill for developer tools.
- [Pytest coverage](https://ai-powered.com/skills/pytest-coverage): Pytest coverage is an open-source agent skill for developer tools.
- [Test scenarios](https://ai-powered.com/skills/test-scenarios): Test scenarios is an open-source agent skill for developer tools.
- [Declarative agents](https://ai-powered.com/skills/declarative-agents): Declarative agents is an open-source agent skill for developer tools.

---
Source: https://ai-powered.com/skills/postman-test-script-generator
