995f598999
* Implement IIndicatorWarmUpPeriodProvider - Implement IIndicatorWarmUpPeriodProvider in PythonIndicator.cs - Make a unit test to check whether the WarmUpPeriod is working as expected - Make a regression test to check the new feature at a system level * Nit change * Change Period parameter for WarmUpPeriod parameter - Change regression test to check if the new parameter keep backwards compatibility with indicators that do not set WarmUpPeriod * Documentation change * Fix tests bugs - In CommonIndicatorTests.cs before finish the test it checks the period.value with the number of samples but for default the period.value was set to -1 * Change names * Change WarmUp and RegisterIndicator methods - Lean WarmUp indicator skip custom python indicators that don't define WarmUpPeriod parameter * Call WarmUpIndicator manually - Add a new "bridge" method called WarmUpIndicator in QCAlgorithm.Python.cs to set up everything to call WarmUpIndicator in QCAlgorithm.Indicators.cs - Change the regression algorithm to warm up the indicators manually * Remove unnecessary code and add more tests * Nit change * Revert "Nit change" This reverts commit da411f59c9e4295d75a11c6c581f615a938dd2c6. * Fix bugs * Try fix bugs * Add C# regression test - More nit changes - Fix bugs * Requested changes * Remove unnecessary code * Requested changes * Nit changes - Add new Python class to check a custom indicator, which doesn't inherits from PythonIndicator, warms up properly * Reduce redundant code
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 succesful 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.