Hello,
I'm currently working on integrating unit tests for my algorithms. Specifically, I export chart data for an indicator from TradingView and use unit tests to verify that my calculations match those from TradingView.
I want to keep both my QuantConnect (QC) algorithm and the unit tests in the same Git project to facilitate CI/CD processes. However, I'm encountering a couple of issues:
- When I create a .sln file for my project in VSCode, the QC plugin marks it with _error.sln.
- I understand that larger test data cannot be uploaded to QC, which is fine, but I need a way to organize my project such that certain folders (e.g., those containing unit tests and large data files) are not uploaded to QC.
Is there a way to mark specific folders in a QC algorithm project as "do not upload" so that I can commit these folders to my GitLab project without them being uploaded to QC? Any advice on best practices for organizing such a project structure would be greatly appreciated.
Thank you!
Mia Alissi
Here's an effective way to organize your project for CI/CD and keep only your QuantConnect algorithm code upload-ready, while storing unit tests and large data locally or in Git:
Recommended Project Structure for QuantConnect and Unit Tests
When working with both QuantConnect algorithms and unit tests (plus possibly large test data), it's important to keep your uploadable QC directory clean. Use the following structure as a template:
Folder / File Purpose Included in QC Upload?/qc-algorithmYour main QuantConnect code, config, research modules ✅ Yes/testsUnit test code for CI/CD or local dev ❌ No/test-dataLarge local datasets, test resources ❌ No.gitignoreGit tracking control file —.slnSolution file (for IDEs, not needed by QC) ❌ NoExample
.gitignoreBest Practices
/qc-algorithmstrictly for code to be uploaded/runnable on QuantConnect. Do not place test or IDE files in this folder./testsand/test-data, which can be safely committed to your repo but should not be uploaded to QC./qc-algorithmto QuantConnect. For example, create a deploy script or set your CI/CD pipeline to only include this directory..slnor other IDE-generated files in/qc-algorithm. If QC sees.slnfiles, it may generate a_error.slnand show errors or confusion in the QC IDE. Keep your solution and IDE configs at the root or elsewhere and out of your upload set.What if
.slnor IDE files appear in QuantConnect?If you upload
.slnfiles to QuantConnect, their system often replaces them with_error.slnand may fail to load your project correctly. This can lead to confusion or lost settings in the QC IDE, and should always be avoided.Summary:
Organizing your repo in this way lets you keep robust test coverage and CI/CD workflows—committing everything to Git while only uploading what's truly needed to QuantConnect. Always double-check folder contents before deploying/uploading, and automate the process to prevent mistakes.
Sources: Shared Libraries - QuantConnect.com, Shared Libraries - QuantConnect.com
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Loki Lokus
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!