Skip to content
Skillpedia
Automations48k · #3681

newman-cicd-integration

Generates CI/CD pipeline configurations to automate API testing with Newman.

What it does

This tool creates ready-to-use configurations for automating API tests. It installs Newman, a tool for running API tests, and sets up how it should function within CI/CD pipelines.

When to use it

  • ✓When you want to automate API tests in your projects.
  • ✓To integrate API tests into automatic build processes.
  • ✓To set up API tests on platforms like GitHub Actions, GitLab CI, or Jenkins.

Example of what to ask your AI

“I need to set up API tests for GitHub Actions, using a local collection file and an environment file. I want JUnit and HTML reports, and the build should fail if tests don't pass.”

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

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/newman-cicd-integration/SKILL.md

Ready-to-paste message

Use this skill to help me: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/newman-cicd-integration/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
How it works

The tool asks which CI/CD platform you use, where your tests are located, and how you want the results. With this information, it generates code that you can copy and paste into your project.

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 newman-cicd-integration

Or download just the file:

curl -L https://raw.githubusercontent.com/sickn33/agentic-awesome-skills/main/plugins/agentic-awesome-skills-claude/skills/newman-cicd-integration/SKILL.md -o SKILL.md
Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

Newman CI/CD Integration Generator

When to Use

Use this skill when you need generate ready-to-use CI/CD pipeline configurations that install and run Newman for automated API testing. Use this skill whenever the user wants to run Newman in a CI pipeline, integrate Postman collections into automated builds, set up API tests in GitHub Actions, GitLab CI, Jenkins,...

Generate complete, copy-paste-ready CI/CD pipeline configs that install Newman and run Postman collections as part of automated builds.


What to Collect From the User

Before generating a config, determine:

  1. CI platform — GitHub Actions, GitLab CI, Jenkins, Azure DevOps, CircleCI, Bitbucket?
  2. Collection source — local file in repo, or Postman API URL?
  3. Environment — local env file in repo, or env vars injected by CI secrets?
  4. Reporters needed — JUnit XML (for CI test results panel), HTML report, or both?
  5. Node.js version preference (default: 18)
  6. Trigger — on every push, pull request, schedule, or after deploy?
  7. Fail build on test failure? — almost always yes; confirm

Platform Templates

GitHub Actions

name: API Tests

on:
  push:
    branches: [main, develop]
  pull_request:

jobs:
  api-tests:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Set up Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '18'

      - name: Install Newman
        run: |
          npm install -g newman
          npm install -g newman-reporter-htmlextra

      - name: Run API tests
        run: |
          newman run ./collections/my-api.json \
            -e ./environments/staging.json \
            -r cli,junit,htmlextra \
            --reporter-junit-export ./results/junit.xml \
            --reporter-htmlextra-export ./results/report.html \
            --reporter-htmlextra-title "API Test Results"
        env:
          BASE_URL: ${{ secrets.BASE_URL }}
          API_KEY: ${{ secrets.API_KEY }}

      - name: Publish test results
        uses: dorny/test-reporter@v1
        if: always()
        with:
          name: Newman API Tests
          path: results/junit.xml
          reporter: java-junit

      - name: Upload HTML report
        uses: actions/upload-artifact@v4
        if: always()
        with:
          name: api-test-report
          path: results/report.html

GitLab CI

stages:
  - test

api-tests:
  stage: test
  image: node:18-alpine
  before_script:
    - npm install -g newman newman-reporter-htmlextra
  script:
    - |
      newman run ./collections/my-api.json \
        -e ./environments/staging.json \
        --env-var "BASE_URL=$BASE_URL" \
        --env-var "API_KEY=$API_KEY" \
        -r cli,junit,htmlextra \
        --reporter-junit-export results/junit.xml \
        --reporter-htmlextra-export results/report.html
  artifacts:
    when: always
    reports:
      junit: results/junit.xml
    paths:
      - results/report.html
    expire_in: 7 days
  variables:
    BASE_URL: $BASE_URL   # Set in GitLab CI/CD > Variables
    API_KEY: $API_KEY

Jenkins (Declarative Pipeline)

pipeline {
  agent any

  tools {
    nodejs 'NodeJS-18'   // Configure in Global Tool Configuration
  }

  stages {
    stage('Install Newman') {
      steps {
        sh 'npm install -g newman newman-reporter-htmlextra'
      }
    }

    stage('Run API Tests') {
      steps {
        sh '''
          newman run ./collections/my-api.json \
            -e ./environments/staging.json \
            -r cli,junit,htmlextra \
            --reporter-junit-export results/junit.xml \
            --reporter-htmlextra-export results/report.html \
            --reporter-htmlextra-title "API Tests - ${BUILD_NUMBER}"
        '''
      }
    }
  }

  post {
    always {
      junit 'results/junit.xml'
      publishHTML([
        allowMissing: false,
        alwaysLinkToLastBuild: true,
        keepAll: true,
        reportDir: 'results',
        reportFiles: 'report.html',
        reportName: 'Newman API Test Report'
      ])
    }
  }
}

Azure DevOps

trigger:
  branches:
    include:
      - main

pool:
  vmImage: 'ubuntu-latest'

steps:
  - task: NodeTool@0
    inputs:
      versionSpec: '18.x'
    displayName: 'Set up Node.js'

  - script: |
      npm install -g newman newman-reporter-htmlextra
    displayName: 'Install Newman'

  - script: |

…
FAQ

What is CI/CD?

CI/CD stands for Continuous Integration and Continuous Delivery/Deployment. These are practices that help automate the software development and testing process, making it faster and more reliable.

What is Newman?

Newman is a command-line tool that allows you to run API test collections created in Postman directly in automation environments.

What are 'collections' and 'environments' in Postman?

Collections are groups of API requests and tests. Environments store variables (like URLs or authentication keys) that can be used in your requests and tests.

Details

Original description by the author

Generate ready-to-use CI/CD pipeline configurations that install and run Newman for automated API testing.

repo: sickn33/agentic-awesome-skills

Popularity

GitHub stars
48k
Ranking position
#3681
License
MIT
Updated
10/15/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills