Unlimited Stress Testing Documentation
Higher concurrency speeds up stress testing but makes debugging harder. Use 1-10 for debugging, 50-100+ for stress testing.
Runs calls one by one for easier debugging and tracing. Slower but sequential logs help identify issues.
Adds randomized delays between calls for more realistic testing. Simulates variable network conditions and timing.
python webhook_simulator.py --url https://api.example.com/webhook --agents 101001,101002,101003,101004,101005,101006,101007,101008 --calls 100 --shuffle
The Python Webhook Simulator is a powerful tool that replicates and enhances all functionality from the original HTML/JS version, with unlimited concurrent requests for stress testing.
Unlike browser limitations (~6 concurrent requests), this Python version can handle unlimited concurrent calls for true stress testing.
pip install aiohttp
sudo apt update && sudo apt install python3 python3-pip python3-aiohttp -y
python webhook_simulator.py --list-presets
python webhook_simulator.py \
--url https://api.example.com/webhook \
--agents 101001,101002 \
--preset inbound-missed
python webhook_simulator.py \
--url https://api.example.com/webhook \
--agents 101001,101002,101003 \
--calls 50 \
--preset inbound-success
Select between concurrent (fast, stress testing) and sequential (controlled, debugging) execution modes.
Multiple calls run simultaneously for maximum performance and stress testing.
python webhook_simulator.py \ --url https://api.example.com/webhook \ --agents 101001,101002 \ --calls 100 \ --concurrent 20 \ --preset inbound-success
✅ Faster execution, ideal for stress testing
Calls run one after another for controlled testing and debugging.
python webhook_simulator.py \ --url https://api.example.com/webhook \ --agents 101001,101002 \ --calls 100 \ --sequential \ --preset inbound-success
✅ Controlled execution, easier to debug
Example: 100 calls, each taking 1.5 seconds
Concurrent (--concurrent 20):
~7.5 seconds total
Sequential (--sequential):
~150 seconds total
python webhook_simulator.py \
--url https://api.example.com/webhook \
--agents 101001,101002,101003 \
--calls 1000 \
--concurrent 50 \
--preset inbound-success
python webhook_simulator.py \
--url https://api.example.com/webhook \
--agents 101001,101002,101003,101004 \
--calls 5000 \
--concurrent 100 \
--preset inbound-success \
--event-delay 100 \
--call-delay 50
python webhook_simulator.py \
--url https://api.example.com/webhook \
--agents 101001,101002,101003,101004 \
--calls 500 \
--concurrent 25 \
--preset inbound-success \
--event-delay 200 \
--call-delay 100
python webhook_simulator.py \
--url https://api.example.com/webhook \
--agents 101001 \
--calls 50 \
--custom-direction outbound \
--custom-status success
python webhook_simulator.py \
--url https://api.example.com/webhook \
--agents 101001 \
--calls 20 \
--custom-direction inbound \
--custom-status missed \
--custom-duplicate
python webhook_simulator.py \
--url https://api.example.com/webhook \
--agents 101001 \
--calls 50 \
--custom-direction outbound \
--custom-status success \
--custom-duplicate \
--random-delay \
--min-delay 0.5 \
--max-delay 3.0
Randomizes direction (inbound/outbound), status (success/missed), duplicates, and phone numbers. No preset required!
Shuffle mode now works without presets and creates truly random call scenarios for ultimate robustness testing.
python webhook_simulator.py \
--url https://api.example.com/webhook \
--agents 101001,101002 \
--calls 100 \
--shuffle
python webhook_simulator.py \
--url https://api.example.com/webhook \
--agents 101001,101002 \
--phones 0682693264,0762545638,0612345678 \
--calls 200 \
--concurrent 20 \
--shuffle \
--preset inbound-success
python webhook_simulator.py \
--url https://api.example.com/webhook \
--agents 101001,101002,101003 \
--calls 500 \
--concurrent 10 \
--shuffle \
--random-delay \
--min-delay 0.5 \
--max-delay 5.0 \
--preset inbound-success
python webhook_simulator.py \
--url https://api.example.com/webhook \
--token your-secret-token \
--agents 101001,101002 \
--calls 100 \
--preset outbound-success
python webhook_simulator.py \
--url https://api.example.com/webhook \
--agents 101001,101002,101003 \
--phones 0682693264,0762545638,0612345678,0698765432 \
--calls 100 \
--concurrent 5 \
--random-delay \
--min-delay 1.0 \
--max-delay 5.0 \
--preset inbound-success
python webhook_simulator.py \
--url https://api.example.com/webhook \
--agents 101001,101002 \
--calls 300 \
--concurrent 15 \
--shuffle \
--preset inbound-success
created → answered → hungup
Successful inbound call
created → hungup
Missed inbound call
created → hungup → hungup
Missed call with duplicate
created → hungup
Unreachable outbound call
created → answered → hungup
Successful outbound call
created → answered → hungup → hungup
Successful call with duplicate
import asyncio
from webhook_simulator import WebhookSimulator
async def run_custom_test():
simulator = WebhookSimulator()
# Configure your test
await simulator.run_simulation(
webhook_url="https://api.example.com/webhook",
agent_ids=["101001", "101002", "101003"],
phone_numbers=["0682693264", "0762545638"],
num_calls=50,
preset_key="inbound-success",
concurrent_calls=10,
event_delay=300,
call_delay=100,
shuffle=True,
token="your-secret-token"
)
# Run the test
asyncio.run(run_custom_test())
Begin with 1-10 concurrent calls
Increase load incrementally
Enable shuffle for realistic testing
Watch response times and adjust