01 / Overview
Build confidence at several levels
A trading platform must preserve correct behavior as its software, integrations, and operating conditions change. Reliability therefore involves more than keeping a process running: it includes processing orders consistently, detecting unexpected behavior, and identifying resource or connectivity problems that could affect trading.
Featuremine combines unit and regression tests with a dedicated Testing environment, user acceptance testing (UAT) deployed nearly identically to production, and replay of recorded platform activity. Memory and disk checks complement these functional tests. Operational monitoring provides visibility into the services after deployment.
These methods answer different questions. A unit test checks a specific rule. Randomized testing explores combinations of order activity. UAT exercises an integrated deployment. Replay checks whether a candidate version reproduces expected behavior from recorded activity. Together, they provide a broader basis for evaluating changes than any one method alone.
Defined behavior
Unit and regression tests check specific features and previously identified defects.
Integrated behavior
UAT and randomized testing exercise the platform as a working system.
Historical consistency
Replay compares candidate behavior with selected recorded order outcomes.
Operational health
Monitoring tracks resources, services, data flow, and trading-session signals.
This paper describes the engineering approach and its limits. It does not report a measured availability result or certify that every possible failure has been tested.
02 / Environments
Validate in an environment that resembles production
UAT is deployed nearly identically to production so that platform updates can reveal problems before they reach live trading. Shared Ansible playbooks install and configure platform components, service dependencies, and monitoring, while environment inventories supply the settings for each deployment.
Credentials are stored and configured using the same mechanisms in both environments. UAT connects to broker-provided UAT sessions corresponding to the production sessions, allowing updates to exercise broker connectivity through the same platform integration. Environment-specific credentials and session endpoints provide access to the appropriate broker environment.
Using the same deployment mechanisms reduces opportunities for differences in installation and service configuration to conceal defects. It also makes UAT relevant to integration behavior: a component that passes its own tests still needs to work alongside market-data handlers, order gateways, reference data, and operational services.
| Environment | Primary purpose |
|---|---|
| Testing | Exercise the platform with randomized order-lifecycle activity and investigate unexpected behavior. |
| UAT | Validate updates in an integrated deployment that closely resembles production. |
| Production | Operate the services connected to live trading venues and monitor their health. |
The environments are deliberately kept closely aligned, with broker UAT sessions providing the testing counterpart to live sessions. This makes UAT a representative setting for validating platform updates. Results still describe the activity exercised during validation; a broker’s UAT service does not reproduce every condition encountered in live trading.
Release criteria
Before deployment to production, all UAT strategies must operate successfully with expected behavior for at least two full days. During this validation period, the strategies submit tens of thousands of orders. Alerts monitor strategy behavior, including counts of failed and rejected orders, to identify outcomes requiring investigation.
Any failure or unexplained difference blocks further deployment until it is resolved or understood to be expected behavior. Where an investigation establishes that a change in behavior is expected, the corresponding alerts are adjusted to reflect that expectation. An unexplained result remains a release blocker.
Review and approval
The CTO personally reviews production changes. Deployment configuration is reviewed through a GitHub pull request, and each environment uses a protected branch that requires approval before changes can be merged. Changes are merged and deployed only after approval, with deployment performed directly from the protected branch.
As the company grows, responsibility for reviewing production changes is planned to transfer to the Head of Trading. The CTO holds that responsibility today.
Version traceability
Builds are automated through GitHub Actions CI, and build artifacts are retained for specific versions. Production deployment uses the versioned artifacts validated in UAT. Each running service and each binary is versioned, allowing Featuremine to track which service and binary versions are deployed in each environment. Together, versioned artifacts and reviewed deployment configuration connect the UAT validation to the production release.
03 / Testing
Test known cases and explore new combinations
Unit and regression tests
Every platform component has automated unit and regression tests, including order management, risk checks, position calculations, market-data handlers, and broker and exchange integrations. All components are covered by the CI test suites.
Tests added for new functionality verify expected behavior and failure scenarios. When a bug is discovered, a regression test is first added to reproduce it, followed by the fix. This preserves a repeatable check against the defect returning as the platform evolves.
The suites run through GitHub Actions CI on every pull request, including the final release pull request. All CI tests must pass before a pull request can be merged. Testing spans multiple versions of Linux and macOS and both AMD64 and ARM64 architectures.
Broker-session tests
Broker sessions have dedicated identity and regression tests within CI. Identity tests connect one session acting as a client to another acting as a server, send randomized messages based on the protocol, and verify that each received message matches the message sent.
Session regression tests exercise the supported protocol’s message variations and verify that generated FIX logs match certified reference messages. These tests validate session behavior separately from the OMS replay tests.
Randomized order-lifecycle testing
The Testing environment runs a randomized order-lifecycle tester that varies order submission, the number of simultaneously submitted orders, prices, quantities, replacements, cancellations, and timing. It also deliberately sends some messages out of sequence to verify that the OMS handles these errors correctly.
Testing exercises full and partial fills, broker-initiated cancellations, trade busts and corrections, and other order events. Disconnection scenarios are covered by separate tests. Results are checked against computed expected order state, allowing the tester to identify incorrect behavior rather than merely generate activity.
Deterministic OMS processing allows recorded activity to be replayed from logs. The recorded inputs and outputs also provide a baseline for testing software updates: the updated OMS processes the same inputs and must reproduce the original order-processing results, as described in the replay section below.
Randomized testing runs daily for several continuous hours and generates more than 100,000 randomized messages per day. The same release requirement applies to the Testing environment: at least two full days of successful validation before production deployment, with failures or unexplained differences blocking release.
04 / Replay
Compare updates against recorded behavior
Replay runs the updated OMS against the same recorded inputs and requires its order-processing results to match the original results exactly. The comparison excludes control messages and messages outside OMS processing, and disregards execution metadata and rejection-reason wording differences that do not affect order-processing behavior.
Replay runs daily over the preceding week’s recorded randomized-testing data. With more than 100,000 randomized messages generated each day, these recordings provide a large collection of scenarios against which software updates can be compared. The replay specifically tests the OMS; broker sessions and market-data feed handlers are tested separately.
The acceptance requirement covers the order-processing message flow: results and message order must match, with no additional or missing order-processing messages. This checks that an update preserves behavior across the recorded scenarios.
- Recover the test context. The replay workflow reads archived order activity, market data, and OMS configuration. Versioned configuration snapshots identify the baseline when available.
- Run the target version. The archive runner selects configured software versions and uses separate replay working directories. The replay tool supplies recorded inputs and reconstructs relevant market-data and timing context.
- Compare order-processing results. Order-related outputs are decoded and compared, excluding the metadata and nonfunctional wording differences described above. Acceptance requires the same order-processing results in the same sequence, with no additional or missing messages.
- Report the result. The archive runner reports pass or failure for each archive/version combination and returns a failing status if a replay invocation fails.
Randomized testing and replay work together to validate correctness and consistency across software updates. The randomized tester checks order-processing behavior against computed expected order state. Replay then verifies that updated OMS code reproduces those validated results across the preceding week’s recorded scenarios. Together, they test both whether the OMS behaves as expected and whether an update preserves that behavior.
When an update deliberately changes order-processing behavior, the expected differences are temporarily encoded in the replay test. This makes the intended change explicit while preserving the comparison for behavior expected to remain unchanged.
05 / Operations
Observe resources and trading-service health
Memory and disk checks
Resource checks run in Testing, UAT and Production environments. Memory instrumentation detects unexpected allocation or deallocation, while sustained testing checks for unexpected growth in memory consumption. Testing generates more than 100,000 randomized messages daily. Disk checks detect disk errors alongside storage-usage monitoring.
The monitoring configuration includes alerts for high memory and swap usage, disk-space consumption, disk I/O saturation, and read-only filesystems. It also includes CPU and network-interface checks. These signals help identify resource pressure and conditions requiring investigation.
Unexpected memory allocation or deallocation, unexpected memory growth, and disk errors are treated as failures and block further deployment until resolved.
Trading-aware monitoring
Operational monitoring extends beyond host metrics. Configured checks cover service state, OMS heartbeat progression, market-data connectivity and activity, trading-session failures, order-processing errors, and the presence of required reference and account data.
Continuous data-correctness checks run in Testing, UAT and Production environments. These checks validate data against operational requirements, including whether locates are available during the appropriate trading hours. This helps identify missing or unexpected data conditions that could affect trading.
Alert rules and schedules are configured for the deployment and its trading sessions. Automated alerts flag conditions for investigation; the particular services, thresholds, routing, and operating windows determine the monitoring coverage.
Recovery and state integrity
The OMS uses atomic transactional messaging. Every input and action is recorded in committed messages containing the information needed to reconstruct order state and account positions.
State transitions are separated from external side effects. During normal operation, actions generate output messages without modifying internal state themselves. During recovery, the same state-transition logic reconstructs internal state, while actions verify that recorded outputs match the reconstructed actions. A mismatch is treated as a data error.
Orders submitted after the OMS goes down and before recovery completes are rejected back to the client.
Trading sessions use the applicable venue recovery protocol to recover missed messages and handle duplicates. This behavior is certified with each broker. Client gateways similarly exchange received-message counts and retransmit missing messages. Cancel-on-disconnect is configurable where supported by the venue and appropriate for the client.
Corrupted state requires reinitialization rather than replay recovery. Internal OMS state is cleared, venue orders are canceled, and current positions reported by the trading venues are supplied through Start-of-Day messages to establish the new initial state.
Recovery tests cover every component that requires recovery.
06 / Conclusion
Reliability across the software lifecycle
Featuremine’s reliability approach combines checks throughout development, validation and operation. Unit and regression tests establish expected component behavior. Randomized testing exercises varied order lifecycles, while replay checks that updates preserve validated results. Production-like UAT, mandatory CI checks and reviewed deployments govern how changes reach production.
Continuous resource and trading-data checks identify operational problems. Transactional state reconstruction and protocol recovery restore trading state after interruptions, with explicit reinitialization procedures when recorded state is corrupted.
Together, these practices make production readiness depend on demonstrated behavior across successive stages of validation. New features and discovered defects expand the test suite, while recorded testing activity provides a continuing basis for checking subsequent releases. Reliability is therefore maintained as the platform evolves, with each change evaluated against the behavior already established.