Run Tests
Test Runners
Vaktum Test Runners
Test runners are the execution engines that power Vaktum's test execution capabilities. They provide flexibility in where and how your API tests are run.
Types of Test Runners
Vaktum offers two main types of test runners:
1. Cloud Runner
- Hosted by Vaktum: Runs in Vaktum's secure cloud environment
- Zero Setup: Available immediately with no configuration
- Automatic Scaling: Handles large test suites efficiently
- Global Distribution: Run tests from multiple geographic regions
- Ideal For: Public APIs, external testing, and teams that want a managed solution
2. Local Runner
- Self-Hosted: Runs in your own infrastructure (on-premises or cloud)
- Network Access: Can access private APIs behind firewalls
- Resource Control: Uses your computing resources
- Data Privacy: Test data never leaves your network
- Ideal For: Internal APIs, sensitive data, and environments with strict security requirements
Setting Up a Local Runner
To set up a local test runner:
- Install the Vaktum CLI:
# Download instructions at vaktum.com/download
- Configure the Runner:
vaktum runner config --token <your-token>
- Start the Runner:
vaktum runner start
- Register with Vaktum (automatic): The runner will automatically register with your Vaktum account and appear in the Runners dashboard.
Managing Test Runners
Via Vaktum.com
- Navigate to the Runners section of Vaktum.com
- View all registered runners and their status
- Enable or disable runners
- Assign runners to specific environments or test suites
Runner Health Monitoring
Vaktum continuously monitors runner health and provides:
- Status Indicators: See if runners are online, offline, or experiencing issues
- Resource Usage: Monitor CPU, memory, and network utilization
- Test Load: Track how many tests each runner is executing
- Response Time: Measure runner performance and responsiveness
Advanced Runner Configuration
Local runners can be customized with various configuration options:
- Concurrency: Set the maximum number of parallel test executions
- Network Settings: Configure proxies, timeouts, and retry logic
- Resource Limits: Define CPU and memory constraints
- Logging: Adjust log levels and output destinations
- Security: Configure TLS certificates and encryption options
Example configuration file (runner-config.yaml
):
runner:
name: "production-runner"
concurrency: 10
timeoutSeconds: 300
logLevel: "info"
tags:
- "production"
- "internal-network"
network:
proxy: "http://proxy.example.com:8080"
retryCount: 3
Using Runners in CI/CD Pipelines
Runners can be integrated into CI/CD pipelines for automated testing:
- GitHub Actions Example:
jobs: api-tests: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Install Vaktum CLI run: curl -sSL https://get.vaktum.com | sh - name: Start Runner run: vaktum runner start --ci - name: Run Tests run: vaktum test --suite production-suite --env staging
- Jenkins Pipeline Example:
pipeline { agent any stages { stage('API Tests') { steps { sh 'curl -sSL https://get.vaktum.com | sh' sh 'vaktum runner start --ci' sh 'vaktum test --suite production-suite --env staging' } } } }
Best Practices for Test Runners
- Use Multiple Runners: Deploy runners in different environments for redundancy
- Regular Updates: Keep runners up-to-date with the latest version
- Resource Allocation: Ensure runners have adequate resources for your test load
- Monitoring: Set up alerts for runner status changes
- Security: Protect runner tokens and credentials