Modern QA2026Running Tests in CI — tiles
Log inJoin
14 / 65 · 14 API Testing Fundamentals · Newman and pytest for API Automation← prev⊞ allnext →☰ Read as one page

2.5Running Tests in CI

# Run all API tests
API_BASE_URL=https://api.staging.example.com pytest tests/api/ -v --junitxml=results.xml

# Run only smoke tests
API_BASE_URL=https://api.staging.example.com pytest tests/api/ -m smoke -v

# Run with parallel execution
API_BASE_URL=https://api.staging.example.com pytest tests/api/ -n 4 -v

# Run against production (read-only tests only)
API_BASE_URL=https://api.example.com pytest tests/api/ -m "readonly" -v