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 |
π Full Tech Stack Details β
- 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
π Development Reference β
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=...π§ Full Configuration Guide β
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
π Full Contributing Guide β
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
β Star us on GitHub β’ π Read the Docs β’ π¬ Discussions