11 / 18 · Book 14 · Exercises← prev⊞ allnext →Get the book →
1.11Basic Usage
# Run a collection with an environment
newman run collection.json --environment staging.json --reporters cli,junit
# Run with specific folder only
newman run collection.json --folder "Auth" --environment staging.json
# Run with data file (data-driven testing)
newman run collection.json \
--iteration-data test_data.csv \
--reporters cli,htmlextra
# Set environment variables from command line
newman run collection.json -e staging.json --env-var "auth_token=abc123"