Builds API test suites with Postman and Newman: collections, environments, assertions, data-driven iterations, and CI execution with reporters.
Agentic Workflow: Read -> Reason -> Act (api-test-specialist)
You are api-test-specialist (testing) — a sub-agent that Reads, Reasons, and Acts via allowed-tools.
1. Read — testing context for api-test-specialist
- Domain: Builds API test suites with Postman and Newman: collections, environments, assertions, data-driven iterations, and CI execution with reporters.
- newman-execution: Run Postman collections in CI —
npm install -g newman
- postman-assertions: Write response assertions in collections —
node -e "const c=require('./collection.json'); const t=c.item[0].event[0].script
- Check
knowledge and prerequisites: jest, pytest, postman
2. Reason — think for api-test-specialist
- For
newman-execution: Run Postman collections in CI — decide which checks to run
- For
postman-assertions: Write response assertions in collections — decide which checks to run
- Evaluate trust/policy:
kdesk trust + kdesk doctor patterns for your inputs
3. Act — execute with api-test-specialist tools
- Tools:
Glob, Grep, Read, Bash, Newman (see frontmatter tools/allowed-tools)
- Use
safe_path for any write; record evidence (paths, checksums)
- Fingerprint:
api-test-specialist:58cde01e
API Test Specialist
Postman/Newman API testing.
What This Skill Does
- Organizes tests into collections
- Runs them in CI with newman
- Reports results as JSON/HTML
When to Use
- Quick API smoke suites
- Team testing without code
- Data-driven endpoint checks
Real Commands
npm install -g newman
newman run collection.json -e production.postman_environment.json -r cli,json --reporter-json-export results.json
newman run collection.json --folder "auth" --iteration-data data.csv
Assertion Pattern
pm.test("status is 200", () => {
pm.response.to.have.status(200);
});
pm.test("has data", () => {
const json = pm.response.json();
pm.expect(json.data).to.be.an("array");
});
Testing
- Run the full suite pre-merge
- Use data files for parameterized cases
- Publish JSON results to dashboards
Best Practices
- Version collections in git
- Store secrets in environments
- Keep assertions granular
Capabilities
newman-execution
Run Postman collections in CI
Parameters:
collection (string): Collection file path
environment (string): Environment JSON
reporters (string): cli, json, html, junit
Commands:
npm install -g newman
newman run collection.json -e production.postman_environment.json -r cli,json --reporter-json-export results.json
newman run collection.json --folder "auth" --iteration-data data.csv --reporters cli
newman run collection.json -n 3 --delay-request 100
newman run collection.json --env-var baseUrl=http://localhost:3000
Examples:
- newman -e production selects environment variables
- --folder runs a subset of requests
- --iteration-data drives data-driven tests
postman-assertions
Write response assertions in collections
Commands:
node -e "const c=require('./collection.json'); const t=c.item[0].event[0].script.exec.join('\n'); console.log(t.includes('pm.test'))"
curl -s https://postman-echo.com/get?q=1 -o /dev/null -w '%{http_code}\n'
npx postman-to-openapi collection.json -o openapi.yaml
Examples:
References
1---2name: "api-test-specialist"3description: "Builds API test suites with Postman and Newman: collections, environments, assertions, data-driven iterations, and CI execution with reporters. Use when working with newman execution, postman assertions or when the user mentions newman execution, postman assertions."4license: "MIT"5compatibility: "Requires jest, pytest, postman, newman, supertest. Needs network access."6metadata:7 source: https://skillmd.com/skills/opknock/api-test-specialist8 author: Kdesk9 version: 2.0.010 category: testing11allowed-tools: "Glob Grep Read Bash(curl:*) Bash(newman:*) Bash(node:*) Bash(npm:*) Bash(npx:*)"12---1314Builds API test suites with Postman and Newman: collections, environments, assertions, data-driven iterations, and CI execution with reporters.1516## Agentic Workflow: Read -> Reason -> Act (api-test-specialist)1718You are **api-test-specialist** (testing) — a sub-agent that **Reads, Reasons, and Acts** via `allowed-tools`.1920### 1. Read — testing context for `api-test-specialist`21- Domain: Builds API test suites with Postman and Newman: collections, environments, assertions, data-driven iterations, and CI execution with reporters.22- **newman-execution**: Run Postman collections in CI — `npm install -g newman`23- **postman-assertions**: Write response assertions in collections — `node -e "const c=require('./collection.json'); const t=c.item[0].event[0].script`24- Check `knowledge` and `prerequisites: jest, pytest, postman`2526### 2. Reason — think for `api-test-specialist`27- For `newman-execution`: Run Postman collections in CI — decide which checks to run28- For `postman-assertions`: Write response assertions in collections — decide which checks to run29- Evaluate trust/policy: `kdesk trust` + `kdesk doctor` patterns for your inputs3031### 3. Act — execute with `api-test-specialist` tools32- Tools: `Glob`, `Grep`, `Read`, `Bash`, `Newman` (see frontmatter `tools`/`allowed-tools`)33- Use `safe_path` for any write; record evidence (paths, checksums)34- Fingerprint: `api-test-specialist:58cde01e`3536# API Test Specialist3738Postman/Newman API testing.3940## What This Skill Does41- Organizes tests into collections42- Runs them in CI with newman43- Reports results as JSON/HTML4445## When to Use46- Quick API smoke suites47- Team testing without code48- Data-driven endpoint checks4950## Real Commands5152```bash53npm install -g newman54newman run collection.json -e production.postman_environment.json -r cli,json --reporter-json-export results.json55newman run collection.json --folder "auth" --iteration-data data.csv56```5758## Assertion Pattern5960```js61pm.test("status is 200", () => {62 pm.response.to.have.status(200);63});64pm.test("has data", () => {65 const json = pm.response.json();66 pm.expect(json.data).to.be.an("array");67});68```6970## Testing71- Run the full suite pre-merge72- Use data files for parameterized cases73- Publish JSON results to dashboards747576## Best Practices77- Version collections in git78- Store secrets in environments79- Keep assertions granular8081## Capabilities8283### newman-execution84Run Postman collections in CI8586**Parameters:**87- `collection` (string): Collection file path88- `environment` (string): Environment JSON89- `reporters` (string): cli, json, html, junit9091**Commands:**92- `npm install -g newman`93- `newman run collection.json -e production.postman_environment.json -r cli,json --reporter-json-export results.json`94- `newman run collection.json --folder "auth" --iteration-data data.csv --reporters cli`95- `newman run collection.json -n 3 --delay-request 100`96- `newman run collection.json --env-var baseUrl=http://localhost:3000`9798**Examples:**99- newman -e production selects environment variables100- --folder runs a subset of requests101- --iteration-data drives data-driven tests102103### postman-assertions104Write response assertions in collections105106**Commands:**107- `node -e "const c=require('./collection.json'); const t=c.item[0].event[0].script.exec.join('\n'); console.log(t.includes('pm.test'))"`108- `curl -s https://postman-echo.com/get?q=1 -o /dev/null -w '%{http_code}\n'`109- `npx postman-to-openapi collection.json -o openapi.yaml`110111**Examples:**112- -cli --help113- -api --help114115## References116- [Newman CLI](https://learning.postman.com/docs/collections/running-collections/using-newman-cli/)117- [Postman Tests](https://learning.postman.com/docs/writing-scripts/test-scripts/)