Notre avis
Ce skill permet d'exécuter et d'analyser les tests API avec Newman, le CLI de Postman.
Points forts
- Automatise l'exécution des collections Postman en ligne de commande.
- Fournit des scripts d'analyse détaillée des résultats (JSON, JUnit).
- S'intègre facilement dans les pipelines CI/CD.
- Inclut la validation de structure des collections.
Limites
- Nécessite une installation préalable de Newman et Python.
- Les scripts fournis sont spécifiques à ce skill et peuvent nécessiter des adaptations.
- Ne couvre pas la gestion des environnements ou des variables avancées de Postman.
Utilisez ce skill lorsque vous devez exécuter des tests API à partir d'une collection Postman existante, que ce soit localement ou dans un pipeline CI.
Évitez ce skill si vous n'avez pas de collection Postman prête ou si vos tests API nécessitent des interactions complexes non supportées par Newman.
Analyse de sécurité
SûrThe skill executes npm install and runs test scripts, but does so in a controlled manner for legitimate API testing purposes. There is no exfiltration, obfuscation, or destructive behavior. It uses Bash, Read, Write tools which are standard for such tasks.
Aucun point d'attention détecté
Exemples
Run the Newman tests from my Postman collection file and analyze the results.Validate my Postman collection structure to ensure it's correct before running tests.Execute the API tests optimized for CI with JUnit output and collect the results.name: newman-runner description: Run and analyze Newman (Postman CLI) tests. Use when running API tests, validating Postman collections, testing HTTP endpoints, or when user mentions Newman, Postman tests, API validation. allowed-tools: Bash, Read, Write
Newman Runner
This skill provides tools to run Newman (Postman CLI) tests and analyze the results for API testing and validation.
Instructions
Running Newman Tests
-
Verify Newman Installation
- Check if Newman is installed:
which newman - If not installed, install with:
npm install -g newman
- Check if Newman is installed:
-
Run Collection
- Use script:
scripts/run-newman.sh <collection.json> - Or manually:
newman run collection.json --reporters cli,json --reporter-json-export output.json
- Use script:
-
Analyze Results
- Parse JSON output with:
scripts/analyze-newman-results.py output.json - Extract: Pass/fail status, response times, error messages, assertions
- Parse JSON output with:
-
Run in CI/CD
- Use
scripts/run-newman-ci.sh <collection.json>for CI-optimized execution - Produces JUnit XML for CI reporting + JSON for analysis
- Uses GitHub Actions annotation format for inline error reporting
- Use
Available Scripts
scripts/run-newman.sh- Run Newman with standard optionsscripts/run-newman-ci.sh- CI-optimized runner with JUnit outputscripts/analyze-newman-results.py- Parse Newman JSON outputscripts/validate-collection.sh- Validate Postman collection structure
Advanced Patterns
For OpenAPI-to-Newman pipeline, auth injection, and collection management, see the api-contract-testing skill which builds on this runner.
Examples
Example 1: Run API Tests
# Run Newman tests on Postman collection
./scripts/run-newman.sh my-api-tests.json
# Analyze results
./scripts/analyze-newman-results.py newman-results.json
Example 2: Validate Collection
# Check collection is valid before running
./scripts/validate-collection.sh my-collection.json
Example 3: Run in CI
# CI-optimized run with JUnit output
./scripts/run-newman-ci.sh my-api-tests.json
# Results in:
# test-results/api-contract/newman-results.json (JSON)
# test-results/api-contract/newman-junit.xml (JUnit XML)
Requirements
- Newman installed globally:
npm install -g newman - Valid Postman collection JSON file
- Python 3.7+ for analysis scripts
Success Criteria
- Newman tests run successfully
- Results parsed and analyzed
- Pass/fail status clearly reported
- Error details extracted for failures
TDD Red-Green-Refactor
Testing
Skill qui guide Claude a travers le cycle TDD complet.
Audit d'Accessibilité Web
Testing
Réalise un audit d'accessibilité web complet selon les normes WCAG.
Générateur de Tests UAT
Testing
Génère des cas de test d'acceptation utilisateur structurés et complets.