mql5/Experts/Advisors/DualEA/Tests
Princeec13 e0643283d4
2026-02-24 12:48:15 -05:00
..
README.md new files added 2025-10-03 01:39:11 -04:00
Test_CorrelationManager.mq5 2026-02-24 12:48:15 -05:00
Test_GateManager.mq5 2026-02-24 12:48:15 -05:00
Test_Integration.mq5 2026-02-05 23:31:20 -05:00
Test_SessionManager.mq5 new files added 2025-10-03 01:39:11 -04:00
Test_StrategySelector.mq5 new files added 2025-09-25 00:25:48 -04:00
Test_System.mq5 2026-02-24 12:48:15 -05:00
Test_VolatilitySizer.mq5 new files added 2025-09-25 00:25:48 -04:00

DualEA Comprehensive Test Suite

Overview

This suite covers unit, integration, and system-level tests for all major modules of the DualEA architecture, ensuring every feature works both independently and together. All tests are implemented as MQL5 scripts in the Tests/ directory and can be run from MetaEditor or via batch.

Test Coverage Matrix

Module/Class Unit Test Integration Test System Test
StrategySelector Test_StrategySelector Test_Integration Test_System
SessionManager Test_SessionManager Test_Integration Test_System
CorrelationManager Test_CorrelationManager Test_Integration Test_System
VolatilitySizer Test_VolatilitySizer Test_Integration Test_System
GateManager Test_GateManager Test_Integration Test_System
PolicyEngine (in Test_System) (in Test_System) Test_System
LearningBridge (in Test_System) (in Test_System) Test_System
CFeaturesKB (in Test_System) (in Test_System) Test_System
KnowledgeBase (in Test_System) (in Test_System) Test_System

How to Run

  1. Open MetaEditor.
  2. Open any test script in Tests/ (e.g., Test_StrategySelector.mq5).
  3. Press F5 to run. Output will be in the MetaTrader log.
  4. For full system validation, run Test_System.mq5.

Expected Output

  • Each test prints PASS/FAIL for every feature and scenario.
  • System/integration tests print info about cross-feature behavior, logs, and file output (CSV, etc).
  • All failures are explicit in the log.

Extending the Suite

  • For new features/modules, create Test_<Feature>.mq5 in Tests/.
  • Add the new test to the coverage matrix above.
  • Use the same pattern: setup, simulate, assert, log.

Edge Cases & Fault Injection

  • Integration and system tests simulate pointer faults, file I/O errors, and invalid configs.
  • All modules are tested for error handling as well as normal operation.
  • Add a batch script to run all tests nightly and parse logs for failures.
  • Export coverage results for dashboard display.

Last updated: 2025-09-25