A robust, enterprise-grade test automation framework for validating complex financial transaction lifecycles across heterogeneous protocols (FIX, SWIFT, MQ, REST) with mathematical precision.
QUANTAF is the High-Frequency Assurance Engine designed for testing mission-critical financial systems. It provides a comprehensive, layered architecture that separates protocol handling, business logic, AI/ML features, and test execution into cleanly decoupled, independently testable components.
- 📈 Trading Platforms — End-to-end order execution testing
- 🔄 Settlement Engines — Reconciliation and settlement validation
- 💰 Financial Institutions — Compliance and regulatory testing
- ⚡ High-Frequency Systems — Load testing with 1000s of transactions/sec
- 🤖 AI-Driven Testing — NLP-powered scenario generation
QUANTAF is structured in 4 Concentric Layers for clean separation of concerns:
┌─────────────────────────────────────────────────────────┐
│ Layer 4: Test Definition │
│ TestNG | Cucumber BDD | Scenario-Driven Tests │
└──────────────────────┬──────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ Layer 3: AI Cortex │
│ NLP-to-FIX | Smart SWIFT | LLM Providers │
│ LangChain4j | OpenAI | Ollama │
└──────────────────────┬──────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ Layer 2: Logic Core │
│ MarketMaker | TradeLedger | Domain Models │
│ Business Rules | Reconciliation │
└──────────────────────┬──────────────────────────────────┘
↓
┌─────────────────────────────────────────────────────────┐
│ Layer 1: Protocol Adapters │
│ FIX (4.2/4.4/5.0) | SWIFT | MQ | REST OAuth2 │
│ QuickFIX/J | RestAssured | JMS │
└──────────────────────┬──────────────────────────────────┘
↓
Financial Systems Under Test
📖 Learn More About Architecture →
| Protocol | Version | Features |
|---|---|---|
| FIX | 4.2, 4.4, 5.0 | Full message types, session management, persistence |
| SWIFT | All MT Categories | Message validation, schema compliance, stubs |
| Message Queue | ActiveMQ, RabbitMQ, Custom | JMS, broker abstraction, pluggable |
| REST | HTTP/HTTPS | OAuth2, request/response logging, assertions |
- NLP-to-FIX Translation — Convert natural language to FIX messages
- Smart SWIFT Generation — Context-aware, realistic SWIFT message stubs
- Scenario Generation — AI-powered edge case and load test generation
- Pluggable LLMs — OpenAI (GPT-4), Ollama (local), custom providers
- TestNG — Direct Java testing with full IDE support and debugging
- Cucumber BDD — Human-readable feature files for non-technical stakeholders
✅ Rich Reporting — Allure Reports with timeline, trends, and analytics
✅ CI/CD Ready — GitHub Actions, Jenkins, GitLab CI/CD integration
✅ Local Development — Docker Compose with pre-configured services
✅ Container Testing — Testcontainers for ephemeral infrastructure
✅ Security — OAuth2, TLS/SSL, encrypted messaging
✅ Extensibility — Custom protocol adapters, business logic, assertions
✅ Performance — Sub-millisecond latency, 1000s of transactions/sec
✅ Documentation — Comprehensive guides and 100+ code examples
| Category | Technology | Version |
|---|---|---|
| Language | Java | 21 (LTS) |
| Build | Gradle | Latest |
| FIX Protocol | QuickFIX/J | 2.3.1 |
| HTTP Client | RestAssured | 5.4.0 |
| Math/Stats | Apache Commons Math | 3.6.1 |
| LLM Integration | LangChain4j | 0.35.0 |
| Test Runners | TestNG | 7.10.2 |
| BDD Framework | Cucumber | 7.18.0 |
| Reporting | Allure | 2.27.0 |
| Messaging | Jakarta JMS | 3.1.0 |
| Containers | Testcontainers | 1.20.0 |
| Docker | Docker Compose | Latest |
- Java 21+ (Install)
- Gradle (included via gradlew)
- Docker & Docker Compose (for local services)
- mkdocs is no longer required — documentation uses Docusaurus (requires Node.js ≥ 18)
# 1. Clone the repository
git clone https://github.com/vinipx/QUANTAF.git
cd QUANTAF
# 2. Serve documentation locally
./docs.sh
# Opens http://localhost:3000
# 3. Start local services
docker-compose up -d
# 4. Build project
./gradlew build
# 5. Run tests
./gradlew test
# 6. Generate Allure report
./gradlew allureReport
# Open: build/reports/allure-report/index.html
# 7. Stop documentation server
./docs.sh stop@Test
public void testBuyOrderExecution() throws IOException {
// Setup
FixAdapter adapter = new FixAdapter();
adapter.connect("localhost", 9876);
// Create order
FixMessage order = new FixMessageBuilder()
.setSymbol("AAPL")
.setOrderQty(1000)
.setPrice("150.25")
.setSide("BUY")
.build();
// Send & verify
adapter.send(order);
FixMessage execution = adapter.receive(5000);
assertThat(execution).isNotNull();
assertThat(execution.getString(35)).isEqualTo("8"); // ExecutionReport
}Complete, professional documentation is included and available online:
- Overview — Purpose, benefits, target audience
- Architecture — 4-layer design with data flow
- Features — Complete feature list and capabilities
- Tech Stack — Dependencies and versions
- Configuration — YAML setup, env vars, multi-environment
- Examples — TestNG, Cucumber, AI-powered scenarios
- Development Reference — Project structure, extensions, testing
- Allure Reporting — Report generation and analysis
- CI/CD & Docker — GitHub Actions, Jenkins, GitLab, Testcontainers
- Contributing — MIT License, contribution guide
QUANTAF/
├── src/main/java/io/github/vinipx/quantaf/
│ ├── core/ # Business logic (MarketMaker, TradeLedger)
│ ├── protocol/
│ │ ├── fix/ # FIX protocol adapter
│ │ ├── swift/ # SWIFT protocol adapter
│ │ ├── mq/ # Message queue adapter
│ │ └── rest/ # REST client with OAuth2
│ ├── ai/ # AI/LLM integration (NLP, scenario gen)
│ ├── config/ # Configuration management
│ └── reporting/ # Allure integration
│
├── src/test/java/ # Test suites (TestNG & Cucumber)
├── src/test/resources/
│ ├── features/ # Cucumber feature files
│ └── quantaf.yml # Test configuration
│
├── documentation/ # Documentation site (Docusaurus)
│ ├── docs/ # Documentation source (Markdown)
│ ├── src/ # React components & custom CSS
│ └── docusaurus.config.js # Site configuration
├── docker-compose.yml # Local services
├── build.gradle.kts # Build configuration
├── docs.sh # Documentation server launcher
└── README.md # This file
QUANTAF uses YAML-based configuration with environment variable support:
# src/main/resources/quantaf.yml
fix:
host: ${FIX_HOST:localhost}
port: 9876
sender_id: TEST_CLIENT
rest:
baseUrl: ${REST_BASE_URL}
oauth2:
clientId: ${OAUTH_CLIENT_ID}
clientSecret: ${OAUTH_CLIENT_SECRET}
ai:
provider: openai
openai:
apiKey: ${OPENAI_API_KEY}
model: gpt-4
database:
url: ${DB_URL:jdbc:postgresql://localhost:5432/quantaf}Environment Variables:
export FIX_HOST=trading-server.example.com
export OPENAI_API_KEY=sk-...
export OAUTH_CLIENT_ID=...Convert natural language to FIX messages automatically:
FixScenarioAgent agent = new FixScenarioAgent();
String description = "Send a buy order for 1000 shares of AAPL at $150.25";
FixMessage message = agent.translateNlp(description);
// Automatically generates proper FIX message with all fieldsGenerate realistic SWIFT messages based on context:
SmartStubGenerator generator = new SmartStubGenerator();
SwiftMessage stub = generator.generate(trade, settlementDetails);
// Creates valid, context-aware SWIFT messageUse LLMs to create edge cases and load test scenarios:
List<FixMessage> scenarios = agent.generateScenario(
"Test partial fills with price slippage and order rejection"
);Automatic build, test, and documentation publish on push:
# .github/workflows/build.yml
- Build project
- Run all tests
- Generate Allure reports
- Publish docs to GitHub Pages- Docker Compose for local development
- Testcontainers for ephemeral infrastructure in CI
- Automatic service startup and cleanup
✅ GitHub Actions | ✅ Jenkins | ✅ GitLab CI | ✅ Custom
@Test
public void testTradeExecution() {
// Full IDE support, debugging, assertions
Trade trade = tradeLedger.findLatest();
assertThat(trade.getStatus()).isEqualTo(EXECUTED);
}Feature: Trade Settlement
Scenario: Successfully settle a trade
Given a trader sends a buy order for 1000 shares at $150.25
When the market accepts the order
Then the trade ledger should record a confirmed tradeRich, interactive HTML reports with:
✨ Timeline View — Visualize test execution over time
✨ Trends — Historical pass/fail analytics
✨ Severity Filtering — Focus on critical tests
✨ Attachments — Logs, data, screenshots
✨ Step-by-Step Breakdown — Detailed execution traces
./gradlew allureReport
open build/reports/allure-report/index.html- OAuth2 — Secure REST API testing
- TLS/SSL — Encrypted connections
- Message Encryption — PGP signing support
- Credential Management — Environment variable isolation
- Regular CVE Scanning — Dependency security checks
| Use Case | How QUANTAF Helps |
|---|---|
| Trading System Testing | Multi-protocol support, realistic data generation, high-frequency capable |
| Settlement Validation | Reconciliation logic, ledger tracking, end-to-end scenarios |
| Compliance Testing | Edge case generation, regulatory scenario creation, audit trails |
| Load Testing | 1000s transactions/sec, statistical data, performance monitoring |
| Integration Testing | Multi-protocol, Docker services, CI/CD ready |
| Regression Testing | BDD scenarios, detailed reporting, trend analysis |
We welcome contributions! Here's how:
- Fork the repository
- Create a feature branch (
feature/amazing-feature) - Code with tests and documentation
- Commit with clear messages
- Push to your fork
- Create a Pull Request
- Follow Google Java Style Guide
- Write tests for all features
- Update documentation
- Run full test suite before PR
QUANTAF is distributed under the MIT License — free to use, modify, and distribute.
See LICENSE file for full details.
- 📖 Read the Documentation — Comprehensive guides and examples
- ⚡ Try Quick Start — Get running in 5 minutes
- 💬 Join Discussions — Ask questions
- 🐛 Report Issues — Help us improve
- ⭐ Star the Repo — Show your support
- Questions? → GitHub Discussions
- Found a bug? → GitHub Issues
- Documentation? → Full Docs
- Examples? → Usage Examples
Built with ❤️ by vinipx for Financial Systems Testing Community