postman-newman-automation
Helps your agent create commands and scripts to run API tests automatically. Useful for integrating tests into development processes and ensuring code quality.
What it does
This tool generates commands and scripts to run API tests automatically. It helps execute Postman test collections in development environments or in Continuous Integration/Continuous Deployment (CI/CD) systems like Jenkins.
When to use it
- ✓When you need to run Postman API tests outside the graphical interface.
- ✓When automating API test execution in CI/CD pipelines.
- ✓To generate API test reports in formats like HTML or XML.
Example of what to ask your AI
“Create a command to run my 'api_tests.json' collection with the 'prod.json' environment, generating an HTML report named 'report.html' and stopping if a test fails.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
How it works
The tool uses Newman, which is a command-line program for Postman. It constructs the necessary commands, including options to specify collection files, environments, and report types.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add sickn33/agentic-awesome-skills --skill postman-newman-automationOr download just the file:
curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/postman-newman-automation/SKILL.md -o SKILL.mdTechnical content (original SKILL.md)
Original text by the author, straight from GitHub.
Postman Newman Automation
When to Use
Use this skill when you need generate Newman CLI commands, configuration files, Jenkins pipeline scripts, and shell automation for running Postman collections in CI/CD or local environments. Use this skill whenever the user wants to run Postman collections from the command line, automate API tests, integrate...
Generates Newman CLI commands, shell scripts, and Jenkins pipeline configs for running Postman collections in automated environments.
Newman Basics
Newman is Postman's CLI runner. Install with:
npm install -g newman
# Optional HTML reporter:
npm install -g newman-reporter-htmlextra
Core Command Structure
newman run <collection> \
--environment <env-file> \
--globals <globals-file> \
--iteration-count <n> \
--iteration-data <csv-or-json> \
--reporters <reporter-list> \
--reporter-htmlextra-export <output.html> \
--reporter-junit-export <results.xml> \
--timeout-request <ms> \
--delay-request <ms> \
--bail \
--color on
Step 1 — Gather Requirements
Ask or infer from context:
| Parameter | Question |
|---|---|
| Collection source | File path, URL, or Postman API UID? |
| Environment | File path or inline variables? |
| Reporter(s) | CLI only, HTML report, JUnit XML? |
| Fail behavior | Stop on first failure (--bail) or run all? |
| Iterations | Single run or data-driven (CSV/JSON)? |
| Target | Local shell, Jenkins, or both? |
Step 2 — Generate Newman Command
Basic run (local)
newman run collection.json \
--environment environment.json \
--reporters cli,htmlextra \
--reporter-htmlextra-export reports/report.html \
--bail
Run from Postman API (by UID)
newman run "https://api.getpostman.com/collections/<UID>?apikey={{POSTMAN_API_KEY}}" \
--environment environment.json \
--reporters cli,junit \
--reporter-junit-export results/junit.xml
Data-driven run (CSV)
newman run collection.json \
--iteration-data test-data.csv \
--iteration-count 5 \
--reporters cli,htmlextra \
--reporter-htmlextra-export reports/data-driven-report.html
With environment variable overrides (no file needed)
newman run collection.json \
--env-var "base_url=https://staging.api.example.com" \
--env-var "token=abc123" \
--reporters cli
Step 3 — Shell Script
Generate a reusable shell script:
#!/bin/bash
set -e
# Configuration
COLLECTION="./collection.json"
ENVIRONMENT="./environment.json"
REPORT_DIR="./reports"
TIMESTAMP=$(date +"%Y%m%d_%H%M%S")
# Ensure report directory exists
mkdir -p "$REPORT_DIR"
echo "Running Newman collection: $COLLECTION"
newman run "$COLLECTION" \
--environment "$ENVIRONMENT" \
--reporters cli,htmlextra,junit \
--reporter-htmlextra-export "$REPORT_DIR/report_$TIMESTAMP.html" \
--reporter-junit-export "$REPORT_DIR/junit_$TIMESTAMP.xml" \
--timeout-request 10000 \
--bail
EXIT_CODE=$?
if [ $EXIT_CODE -eq 0 ]; then
echo "✅ All tests passed."
else
echo "❌ Tests failed. Check report: $REPORT_DIR/report_$TIMESTAMP.html"
exit $EXIT_CODE
fi
Step 4 — Jenkins Pipeline
Declarative Jenkinsfile (preferred)
pipeline {
agent any
environment {
POSTMAN_ENV = credentials('postman-environment-file') // Jenkins credential ID
}
stages {
stage('Install Newman') {
steps {
sh 'npm install -g newman newman-reporter-htmlextra'
}
}
stage('Run API Tests') {
steps {
sh """
newman run collection.json \\
--environment ${POSTMAN_ENV} \\
--reporters cli,htmlextra,junit \\
--reporter-htmlextra-export reports/report.html \\
--reporter-junit-export reports/junit.xml \\
--timeout-request 10000 \\
--bail
"""
}
}
}
post {
always {
// Archive HTML report
publishHTML(target: [
allowMissing: false,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: 'reports',
reportFiles: 'report.html',
reportName: 'Newman API Test Report'
])
// Archive JUnit results
junit 'reports/junit.xml'
}
failure {
echo 'API tests failed! Check the Newman report.'
}
}
}
Scripted Jenkinsfile (if declarative not available)
node {
stage('Install Newman') {
…
FAQ
What is Newman?
Newman is the command-line version of Postman, allowing you to run API tests directly from your terminal without opening the Postman graphical interface.
What are 'collections' and 'environments' in Postman?
Collections group your API requests and tests. Environments store variables (like URLs or tokens) that change depending on where you are testing (development, production, etc.).
What is CI/CD?
CI/CD (Continuous Integration/Continuous Deployment) is a software development practice where testing and deployment are automated. Tools like Jenkins are used for this.
Details
Original description by the author
Generate Newman CLI commands, configuration files, Jenkins pipeline scripts, and shell automation for running Postman collections in CI/CD or local environments.
Popularity
- GitHub stars
- 48k
- Ranking position
- #3863
- License
- MIT
- Updated
- 10/15/2026
Comments
- …
More skills from this repository
00-andruia-consultant
Helps your agent start or improve AI projects. It analyzes code, suggests tools, and creates action plans in Spanish.
sickn33/agentic-awesome-skills
007
Lets your agent perform security audits and threat modeling. It's useful for protecting projects against attacks and vulnerabilities.
sickn33/agentic-awesome-skills
10-andruia-skill-smith
Helps your agent create or improve AI tools. It defines how tools work, writes documentation, and validates the structure.
sickn33/agentic-awesome-skills
20-andruia-niche-intelligence
Lets your agent create a summary about a specific industry. It's useful for understanding the context, rules, usage patterns, and risks of a project, using reliable sources.
sickn33/agentic-awesome-skills
Similar skills
bun-runtime
Has your agent use Bun to run, organize, and test code. It helps choose Bun over other tools and migrate existing projects.
affaan-m/ECC
database-migrations
Helps your agent make safe changes to databases. It ensures changes can be undone and minimizes downtime.
affaan-m/ECC
deployment-patterns
Sets up deployment and CI/CD workflows, containerization, and rollback strategies to ensure safe releases.
affaan-m/ECC