Advanced Topics¶
Deep dives into VenomQA's architecture, extension points, and optimization techniques.
Overview¶
This section covers advanced topics for users who want to extend VenomQA, optimize performance, or understand the internals.
Prerequisites
Before diving into advanced topics, ensure you're comfortable with:
- Core Concepts - Actions, Invariants, World
- Basic Usage - Running explorations
- State Management - Context and checkpoints
Topics¶
-
Performance Tuning
Optimize exploration speed, memory usage, and CI integration. Learn about parallel exploration, state pruning, and benchmarking.
-
Custom Reporters
Create custom output formats for Slack, Discord, or your own dashboards. Implement the Reporter protocol.
-
Custom Backends
Add support for MongoDB, Elasticsearch, or custom data stores. Implement the SystemAdapter protocol.
-
Testing Patterns
Common patterns for testing CRUD operations, auth flows, payment systems, and multi-tenant applications.
When to Use Advanced Features¶
| Scenario | Recommended Topic |
|---|---|
| Exploration too slow | Performance Tuning |
| Need Slack/Discord alerts | Custom Reporters |
| Using MongoDB, Elasticsearch | Custom Backends |
| Complex business logic | Testing Patterns |
| Large state space | Performance Tuning |
| CI/CD integration | Performance Tuning |
Architecture Overview¶
┌─────────────────────────────────────────────────────────┐
│ Agent │
│ ┌─────────────┐ ┌──────────────┐ ┌───────────────┐ │
│ │ Strategy │ │ Invariants │ │ Graph │ │
│ │ (BFS/DFS/..)│ │ Checker │ │ (States) │ │
│ └─────────────┘ └──────────────┘ └───────────────┘ │
└───────────────────────┬─────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ World │
│ ┌─────────────┐ ┌──────────────┐ ┌───────────────┐ │
│ │ API │ │ Context │ │ Systems │ │
│ │ (HTTP/ASGI)│ │ (Key-Value) │ │ (DB/Cache) │ │
│ └─────────────┘ └──────────────┘ └───────────────┘ │
└───────────────────────┬─────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────┐
│ Rollbackable Systems │
│ ┌─────────────┐ ┌──────────────┐ ┌───────────────┐ │
│ │ PostgreSQL │ │ Redis │ │ Custom DB │ │
│ │ (SAVEPOINT) │ │ (DUMP/RESTORE)│ │ (Your Impl) │ │
│ └─────────────┘ └──────────────┘ └───────────────┘ │
└─────────────────────────────────────────────────────────┘
Extension Points¶
VenomQA is designed for extensibility at every layer:
| Layer | Extension Point | Protocol/Class |
|---|---|---|
| Exploration | Custom strategies | ExplorationStrategy |
| Reporting | Custom reporters | Callable or class |
| State | Custom backends | Rollbackable |
| Actions | Custom action logic | Callable (api, context) |
| Invariants | Custom checks | Callable (world) |
Getting Help¶
- GitHub Discussions - Ask questions
- GitHub Issues - Report bugs
- Examples - Code examples