Files
Martin-Molinero a3e984f347
Syntax Tests / build (push) Has been cancelled
API Tests / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Regression Tests / build (push) Has been cancelled
Report Generator Tests / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
Fix flaky TriggersWeeklyScheduledEventsEachWeekLive test (#9547)
The live realtime scan loop paces itself with WaitTillNextSecond, which on
Windows sleeps ~15ms (default timer granularity). The test advances simulated
time 60 minutes per iteration over ~7 weeks (~1200 iterations), so the loop
could take longer than the 15s wait timeout, causing Exit to cut it short
before the last weekly event fired and intermittently dropping the final
expected trigger time.

Time is fully driven by the ManualTimeProvider in tests, so override
WaitTillNextSecond to a no-op in the test handler. The 60-minute stepping is
deterministic regardless of sleeping, so the loop now runs at full speed and
the test passes reliably.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-18 13:38:46 -03:00
..
2026-04-20 18:22:39 -03:00
2024-07-10 14:17:27 -03:00
2024-01-05 16:57:19 -03:00

QuantConnect Testing

Before starting any testing, follow the installation instructions to get LEAN running C# algorithms in your machine. For any Python related tests please ensure you have followed the setup as described here.

If the above installation, build, and initial run was successful than we can move forward to testing.

Visual Studio:

Locating Tests

  • Open Visual Studios
  • Open Test Explorer ("Test" > "Test Explorer")
  • The list should populate itself as it reads all the tests it found during the build process. If not, press "Run All Tests" and let VS find all of the tests.
  • From here select the tests you would like to run and begin running them.

Failed Test Logs

  • On a failed test, check the test for information by clicking on the desired test and selecting "Open Additional Output"
  • This will show the stack trace and where the code failed to meet the testing requirements.

Common Problems

Having .NetFramework issues with testing?

Missing dependencies for Python Algorithm?

  • Use pip or conda to install the module.