Skip to content

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:

  1. Go to Wallets → [Wallet] → Alerts
  2. Click Test Rules
  3. Enter test transaction parameters:
  4. Type (deposit/withdrawal)
  5. Amount
  6. Address
  7. Fee rate
  8. Click Simulate
  9. 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:

  1. Create a testnet wallet
  2. Configure alert rules
  3. Get testnet coins from faucet
  4. Send test transactions
  5. 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:

  1. Set up rules
  2. Send small transaction (e.g., 0.0001 BTC)
  3. Verify alerts
  4. 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 →