Testing Alert Rules¶
Verify your alert rules work correctly before relying on them for security.
Why Test?¶
- Ensure rules trigger as expected
- Verify notification delivery
- Catch configuration errors
- Build confidence in your setup
Testing Methods¶
Method 1: Rule Simulator¶
Use the built-in simulator without real transactions:
- Go to Wallets → [Wallet] → Alerts
- Click Test Rules
- Enter test transaction parameters:
- Type (deposit/withdrawal)
- Amount
- Address
- Fee rate
- Click Simulate
- See which rules would trigger
Example:
Test Transaction:
Type: Deposit
Amount: 0.05 BTC
Fee: 25 sat/vB
Results:
✅ Rule "Large Deposits" matched
❌ Rule "High Priority" not matched (fee too low)
Method 2: Testnet Testing¶
Test with real transactions on testnet:
- Create a testnet wallet
- Configure alert rules
- Get testnet coins from faucet
- Send test transactions
- Verify alerts fire correctly
Advantages: - Real mempool behavior - Tests full notification pipeline - No mainnet risk
Method 3: Small Mainnet Transactions¶
Test with small amounts on mainnet:
- Set up rules
- Send small transaction (e.g., 0.0001 BTC)
- Verify alerts
- Adjust rules as needed
Caution: Use small amounts only
Test Checklist¶
Before going live with alert rules:
- [ ] Rules configured for all critical scenarios
- [ ] Tested with simulator
- [ ] Verified on testnet
- [ ] All notification channels tested
- [ ] Confirmation level alerts tested
- [ ] False positive check (shouldn't alert on excluded conditions)
- [ ] Documentation of rule logic
Common Issues¶
Rule Not Triggering¶
Check: - Rule is enabled - Transaction meets all conditions - Notification preferences allow this event - Channels are configured
Debug: 1. Use simulator with exact parameters 2. Check rule order (first match wins) 3. Review condition logic (AND vs OR)
Too Many Alerts¶
Solutions: - Increase amount thresholds - Add more specific conditions - Use confirmation levels to reduce noise - Consolidate similar rules
Delayed Alerts¶
Causes: - Network latency - Channel delivery time - Mempool congestion
Delivery time varies by channel and network conditions.
Example Test Plan¶
Cold Storage Wallet¶
Test 1: Any Deposit Detection
Send: 0.001 BTC to monitored address
Expect: Immediate 0-conf alert
Channels: Email, Nostr
Test 2: Confirmation Tracking
Wait for confirmations
Expect: Alerts at 1, 3, 6 confirmations
Channels: Email
Test 3: Unauthorized Withdrawal
(Testnet only - test Theft Shield)
Send: From monitored wallet to non-whitelisted address
Expect: Theft Shield incident alert
Channels: All
Business Wallet¶
Test 1: Customer Payment
Send: 0.01 BTC deposit
Expect: Webhook POST to accounting system
Verify: Database updated
Test 2: Small Dust Deposit
Send: 0.00001 BTC
Expect: No alert (below threshold)
Verify: Not in webhook logs
Test 3: Large Payment
Send: 1.0 BTC deposit
Expect: High-priority alert
Channels: Email, Webhook, Nostr
Ongoing Testing¶
Regular verification:
- Monthly: Test critical alert rules
- Before important transactions: Verify setup
- After rule changes: Test affected scenarios
- After system updates: Confirm rules still work
Back to: Alerts Overview →