Auto-generate comprehensive API test suites from your spec files
# Point Markus at your OpenAPI spec
$ markus generate --spec openapi.yaml
✓ Found 47 endpoints in spec
✓ Generated 342 tests in 2.3s
# Generated pytest tests:
def test_create_payment_endpoint(client, db):
response = client.post('/api/payments', json={
'amount': 10000,
'currency': 'USD',
'customer_id': 'cus_123'
})
assert response.status_code == 201
# Verify database state
payment = db.query(Payment).first()
assert payment.amount == 10000Automatically verify database changes after every API call
# Markus auto-generates database assertions
def test_update_user_endpoint(client, db):
response = client.patch('/api/users/123', json={
'email': 'new@example.com'
})
assert response.status_code == 200
# Database verification (auto-generated)
user = db.query(User).filter_by(id=123).first()
assert user.email == 'new@example.com'
assert user.updated_at > user.created_at
# Verify audit log created
audit = db.query(AuditLog).filter_by(
user_id=123, action='UPDATE'
).first()
assert audit is not NoneGenerate tests for your preferred language and framework
# Python (pytest)
$ markus generate --spec api.yaml --framework pytest
# Node.js (Jest + Supertest)
$ markus generate --spec api.yaml --framework jest
# Java (RestAssured)
$ markus generate --spec api.yaml --framework restassured
# All tests follow best practices:
# - Proper setup/teardown
# - Database transactions
# - Clean test data
# - Clear assertionsSeamlessly integrate into GitHub Actions, GitLab CI, Jenkins, and more
# .github/workflows/api-tests.yml
name: API Tests
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: markus test --spec openapi.yaml
# Auto-generates & runs API tests
# Blocks PRs with failing endpoints
# Creates Jira tickets for failures
Exit code: 1 if any test fails
✓ Blocks deployment automaticallyAutomatically create tickets for test failures with full context
# Auto-create tickets for failures
$ markus test --create-tickets
✓ 3 tests failed
✓ Created Jira ticket API-247: POST /payments fails
✓ Created GitHub issue #184: Auth timeout
# Pull existing tickets
$ markus tickets pull
Ticket API-247: In Progress
Assigned to: @backend-team
Last updated: 2h ago
# Tickets include:
# - Failing endpoint
# - Request/response samples
# - Stack trace
# - Suggested fixActionable insights with coverage metrics and failure analysis
📊 Markus Test Report
Endpoints: 47 tested
Tests: 342 total (339 passed, 3 failed)
Coverage: 94% of spec validated
Avg Response: 142ms
Critical Failures:
❌ POST /api/payments - 500 Internal Error
❌ GET /api/users/:id - Timeout (30s)
❌ PATCH /api/subscriptions - Schema mismatch
Recommendations:
1. Fix payment processing logic
2. Add database index on users.id
3. Update subscription response schemaTrack dependencies and scan for vulnerabilities in your Kubernetes deployments
# Auto-generate SBOM for K8s cluster
$ markus sbom scan --cluster production
✓ Scanned 47 container images
✓ Found 312 dependencies
✓ Detected 3 CVEs
📦 SBOM Summary
Dependencies: 312 tracked
Critical CVEs: 1
├─ CVE-2024-1234 (openssl@1.1.1k)
└─ Affects: POST /api/payments
High CVEs: 2
├─ CVE-2024-5678 (express@4.17.1)
└─ Affects: 12 API endpoints
Compliance Score: 85/100
✓ NTIA minimum elements
✓ SPDX 2.3 format
⚠ 3 outdated dependencies
# Auto-create Jira ticket for critical CVE
Ticket created: SEC-892
Assigned to: @security-teamScan Terraform, Helm, and Kubernetes manifests to detect API endpoint impact
# Scan IaC files in repository
$ markus iac scan --repo ./infrastructure
✓ Found 25 IaC files
├─ 12 Kubernetes YAML
├─ 5 Helm charts
└─ 8 Terraform files
🔍 IaC Analysis Results
Detected API Endpoints:
✓ GET /api/v1/users
└─ k8s/ingress.yaml → user-service:8080
└─ Has tests (24 passing)
⚠ POST /api/v1/payments
└─ helm/api/ingress.yaml → payment-svc:3000
└─ No tests found - Auto-generating...
Security Issues: 3 found
❌ CRITICAL: Privileged container
File: k8s/deployment.yaml:15
Fix: Set securityContext.privileged = false
⚠ MEDIUM: Missing resource limits
File: k8s/deployment.yaml:32
Fix: Add resources.limits.memory
Deprecated APIs: 1 found
✗ k8s/deployment.yaml uses apps/v1beta1
(Removed in Kubernetes 1.16+)
Migrate to: apps/v1