8bcd588602
Regression Tests / build (push) Has been cancelled
Python Virtual Environments / build (push) Has been cancelled
Benchmarks / build (push) Has been cancelled
Build & Test Lean / build (push) Has been cancelled
Research Regression Tests / build (push) Has been cancelled
* Adds Unit Tests The `LimitFill` method should not fill using `QuoteBar` or `Tick` with `TickType.Quote` type. Adds missing test for tick data (`TickType.Trade`). * Fixes EquityFillModel.FillModel Use `Tick` with `TickType.Trade` or `TradeBar` information to fill limit orders. * Update Regression Test Expected Statistics The regression tests changed because of different fills. The `ExtendedMarketTradingRegressionAlgorithm` has different number of trades because of an extra fill on the 4th order generated by TradeBar with a Low lower than than the QuoteBar.Ask Low: > 20230222 13:56:24.251 TRACE:: Log: Time: 10/10/2013 12:01:00 OrderID: 4 EventID: 2 Symbol: SPY Status: Filled Quantity: 10 FillQuantity: 10 FillPrice: 143.8998 USD > asset.Cache.GetData<QuoteBar>().ToString() "SPY: Bid: O: 144.2457 Bid: H: 144.2629 Bid: **L: 144.2457** Bid: C: 144.2629 Ask: O: 144.2543 Ask: H: 144.2889 Ask: **L: 144.2543** Ask: C: 144.2889 " > asset.Cache.GetData<TradeBar>().ToString() "SPY: O: 144.2543 H: 144.4532 **L: 143.4156** C: 144.2716 V: 75423" * Improves Tick Resolution Unit Test * Fixes Tick Resolution Case Handling `master` only considers the latest trade, missing possible fills in the batch of trades. * Adds Unit Test for Gap See https://github.com/QuantConnect/Lean/issues/963 * Addresses Fill Optimistic Assumption If we have a bar that gaps in our favor, we accept the limit price to avoid optimitic fills. * Fixes Regression Tests All regression tests with limit orders have worst performance after we remove the optimitic assumption, and use the limit price instead.
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?
- Install NUnit3TestAdapter for VS
Missing dependencies for Python Algorithm?
- Use pip or conda to install the module.