Saltar al contenido
Skillpedia
Automatizaciones48 mil · #5295

newman-cicd-integration

Qué hace

Esta herramienta crea configuraciones listas para usar para automatizar pruebas de API. Instala Newman, una herramienta para ejecutar pruebas de API, y configura cómo debe funcionar dentro de los pipelines de CI/CD.

Cuándo usarla

  • ✓Cuando quieras automatizar las pruebas de API en tus proyectos.
  • ✓Para integrar las pruebas de API en los procesos automáticos de compilación.
  • ✓Para configurar las pruebas de API en plataformas como GitHub Actions, GitLab CI o Jenkins.

Link de la skill

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

Cópialo y pégalo en tu IA (Claude, ChatGPT o Cursor) pidiéndole que siga las instrucciones.

Cómo usar

La forma más fácil: copia el mensaje y pégalo en tu IA. Ella lee la skill y sigue las instrucciones.

Mensaje listo para pegar

Usa esta skill para ayudarme: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/newman-cicd-integration/SKILL.md Lee el archivo SKILL.md de ese link y sigue sus instrucciones en mi tarea.
¿Quieres que tu IA encuentre skills como esta por sí sola?Instala el MCP gratis de Skillpedia: una línea, y busca entre 15.000+ skills antes de cada tarea.Instalar en 1 minuto →

Ejemplo de qué pedirle a la IA

“Necesito configurar pruebas de API para GitHub Actions, usando un archivo de colección local y un archivo de entorno. Quiero informes JUnit y HTML, y que la compilación falle si las pruebas no pasan.”

5 skills nuevas por semana. 1 minuto de lectura.

Cómo funciona

La herramienta te pregunta qué plataforma de CI/CD usas, dónde están tus pruebas y cómo quieres ver los resultados. Con esa información, genera código que puedes copiar y pegar en tu proyecto.

Contenido técnico (SKILL.md original)

Texto original del autor, en inglés, directo de 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: |

…
Preguntas frecuentes

¿Qué es CI/CD?

CI/CD son las siglas de Continuous Integration y Continuous Delivery/Deployment (integración continua y entrega o despliegue continuo). Son prácticas que ayudan a automatizar el proceso de desarrollo y de pruebas de software, haciéndolo más rápido y fiable.

¿Qué es Newman?

Newman es una herramienta de línea de comandos que permite ejecutar colecciones de pruebas de API creadas en Postman directamente en entornos de automatización.

¿Qué son las «colecciones» y los «entornos» en Postman?

Las colecciones son grupos de peticiones de API y sus pruebas. Los entornos guardan variables (como URLs o claves de autenticación) que se pueden usar en tus peticiones y pruebas.

Detalles

Descripción original del autor

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

repo: sickn33/agentic-awesome-skills

Popularidad

Estrellas en GitHub
48 mil
Posición en el ranking
#5295
Licencia
MIT
Actualizada
15/10/2026

¿Te sirve esta skill?

0

Entra para votar.

Comentarios

  • …

Más skills de este repositorio

Skills parecidas