A comprehensive load testing tool for the vCon Server that validates the complete processing pipeline including tagging, file storage, and webhook delivery.
- Automated Configuration: Sets up conserver with ingress lists, tagging, and webhook endpoints
- JLINC Tracer Support: Optional integration with JLINC tracing system for event tracking
- Environment Variable Configuration: Secure configuration using .env files for sensitive data
- Load Testing: Configurable rate, amount, and duration testing
- Validation: Validates vCon processing, file saving, and webhook delivery
- Performance Metrics: Measures response times, success rates, and throughput
- Rich CLI: Beautiful command-line interface with progress bars and results tables
- Python 3.12+
- uv package manager
- vCon Server running and accessible
- Sample vCon files (you'll need to provide your own)
- Install dependencies:
uv sync- Configure environment variables (optional but recommended):
# Copy the example environment file
cp .env.example .env
# Edit .env with your actual values
nano .env-
Make sure your vCon Server is running and accessible
-
Ensure you have sample vCon files available for testing (you'll need to provide your own)
-
(Optional) Start the standalone webhook server for testing:
uv run test_webhook.py# Run with default settings (10 req/s, 100 requests, 60s duration)
uv run load_test_app.py
# Custom configuration
uv run load_test_app.py --rate 20 --amount 200 --duration 120
# Custom conserver URL and token
uv run load_test_app.py --conserver-url http://localhost:8000 --conserver-token your-token--conserver-url: vCon Server URL (default: http://localhost:8000)--conserver-token: API token for authentication (default: test-token)--test-directory: Directory to save test results (default: ./test_output)--webhook-port: Port for webhook server (default: 8080)--rate: Requests per second (default: 10)--amount: Total number of requests (default: 100)--duration: Test duration in seconds (default: 60)--sample-vcon-path: Path to sample vCon files (default: ./sample_data)
--jlinc-enabled: Enable JLINC tracer (flag)--jlinc-data-store-api-url: JLINC data store API URL--jlinc-data-store-api-key: JLINC data store API key--jlinc-archive-api-url: JLINC archive API URL--jlinc-archive-api-key: JLINC archive API key--jlinc-system-prefix: JLINC system prefix (default: VCONTest)--jlinc-agreement-id: JLINC agreement ID--jlinc-hash-event-data/--no-jlinc-hash-event-data: Hash event data in JLINC--jlinc-dlq-vcon-on-error/--no-jlinc-dlq-vcon-on-error: Send vCon to DLQ on error
--restore-config/--no-restore-config: Restore original conserver configuration after test (default: true)
# High load test
uv run load_test_app.py --rate 50 --amount 1000 --duration 300
# Quick validation test
uv run load_test_app.py --rate 5 --amount 10 --duration 30
# Custom test directory
uv run load_test_app.py --test-directory /tmp/vcon_test_output
# Enable JLINC tracer
uv run load_test_app.py --jlinc-enabled --jlinc-data-store-api-key your-key
# Using environment variables (recommended for production)
# Set JLINC_ENABLED=true in .env file, then run:
uv run load_test_app.py
# Skip configuration restoration (keep test config)
uv run load_test_app.py --no-restore-configThe application automatically handles conserver configuration to ensure your original setup is preserved:
- Backup: Before applying the test configuration, the application automatically backs up the existing conserver configuration to a timestamped file in the test directory
- Test Configuration: Applies the load test configuration with tagging, webhook, and optional JLINC tracer
- Restore: After the test completes, automatically restores the original configuration (unless disabled with
--no-restore-config)
Backup files are saved as conserver_config_backup_{timestamp}.yml in the test directory. These files contain the complete original configuration and can be used to manually restore the conserver if needed.
# Run test without restoring original configuration
uv run load_test_app.py --no-restore-config
# The backup file will still be created for manual restoration if neededThe application supports configuration via environment variables for secure handling of sensitive data like API keys. Create a .env file in the project root:
# Copy the example file
cp .env.example .env
# Edit with your values
nano .envCONSERVER_URL: vCon Server URLCONSERVER_TOKEN: API token for authenticationJLINC_ENABLED: Enable JLINC tracer (true/false)JLINC_DATA_STORE_API_URL: JLINC data store API URLJLINC_DATA_STORE_API_KEY: JLINC data store API keyJLINC_ARCHIVE_API_URL: JLINC archive API URLJLINC_ARCHIVE_API_KEY: JLINC archive API keyJLINC_SYSTEM_PREFIX: JLINC system prefixJLINC_AGREEMENT_ID: JLINC agreement IDJLINC_HASH_EVENT_DATA: Hash event data in JLINC (true/false)JLINC_DLQ_VCON_ON_ERROR: Send vCon to DLQ on error (true/false)
The JLINC tracer provides event tracking and audit capabilities for vCon processing. When enabled, it will:
- Track all vCon processing events
- Store event data in the configured JLINC data store
- Archive processed vCons for compliance
- Handle error scenarios with DLQ (Dead Letter Queue)
- Set up your JLINC server and obtain API keys
- Configure the environment variables in your
.envfile - Run the load test with JLINC enabled:
# Using environment variables (recommended)
export JLINC_ENABLED=true
uv run load_test_app.py
# Or using command line flags
uv run load_test_app.py --jlinc-enabled --jlinc-data-store-api-key your-keyThe JLINC tracer requires a running JLINC server accessible at the configured URL (default: http://jlinc-server:9090).
Example API Keys (from the provided configuration):
- Data Store API Key:
ZDU5ZWIxMzc0ZDhjOThlNTRkNTYxYzc1Y - Archive API Key:
NTFhZGRjNzA0MjFlY2ZiYmFiMGU3MjQ2M
Note: If the JLINC server is not accessible, the tracer will report invalid API keys. Ensure your JLINC server is running and accessible before enabling the tracer.
-
Configuration Setup: Creates a conserver configuration with:
- Ingress list for receiving vCons
- Random tag addition module
- File storage for saving processed vCons
- Webhook endpoint for delivery confirmation
- Optional JLINC tracer for event tracking
-
Load Testing:
- Loads a random sample vCon
- Sends vCons at specified rate to conserver
- Measures response times and success rates
- Tracks webhook deliveries and file saves
-
Validation:
- Verifies vCon processing success
- Confirms webhook delivery
- Validates file storage
- Calculates performance metrics
-
Results:
- Displays comprehensive results table
- Saves detailed JSON report
- Provides success/failure indicators
The application provides detailed metrics including:
- Request Metrics: Total, successful, and failed requests
- Performance: Average response time and throughput
- Delivery: Webhook delivery rate and file save rate
- Overall Success: Pass/fail based on success thresholds
- Test Results: JSON file with complete test data saved to the specified test directory
- Configuration: YAML configuration used for conserver setup
- Processed vCons: Saved vCon files in the test directory
- vCon Server must be running and accessible
- API token must be valid
- Sample vCon files must be available
- Webhook port must be available for the test server
- Connection Refused: Check that vCon Server is running and accessible
- Authentication Failed: Verify API token is correct
- No Sample vCons: Ensure sample vCon files exist in the specified directory (you'll need to provide your own)
- Port Already in Use: Change webhook port if 8080 is occupied
Enable debug logging by setting the log level:
export PYTHONPATH=.
python -c "import logging; logging.basicConfig(level=logging.DEBUG)" load_test_app.pyload_test/
├── load_test_app.py # Main application
├── demo.py # Demo script
├── test_setup.py # Setup verification script
├── test_webhook.py # Standalone webhook server for testing
├── pyproject.toml # Dependencies and configuration
├── .env.example # Example environment configuration
├── LICENSE # MIT License
├── CONTRIBUTING.md # Contribution guidelines
├── README.md # This file
├── QUICK_REFERENCE.md # Quick start guide
├── LOAD_TEST_SUMMARY.md # Test results summary
├── PROGRESS_REPORT.md # Development progress report
├── example_test_config.yml # Example test configuration
The repository includes a standalone webhook server (test_webhook.py) for testing webhook functionality independently:
# Start the webhook server
uv run test_webhook.py
# Test webhook endpoint
curl -X POST http://localhost:8080/webhook \
-H 'Content-Type: application/json' \
-d '{"test": "data"}'
# Check received webhooks
curl http://localhost:8080/webhooksThe application is modular and can be extended with:
- Additional validation checks
- Custom load testing patterns
- Different storage backends
- Enhanced reporting formats
This project is licensed under the MIT License - see the LICENSE file for details.
We welcome contributions! Please see our Contributing Guidelines for details on how to get started.
This project is part of the vCon ecosystem. For more information about vCon Server, visit the vCon Server repository.