Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit test framework #16

Open
umitanuki opened this issue Sep 7, 2018 · 2 comments
Open

Unit test framework #16

umitanuki opened this issue Sep 7, 2018 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@umitanuki
Copy link
Contributor

Each algo code should be easily unit tested. The concept of unit test is not very known to the type of users here. Rather than asking them to build their own unit test, we should provide some high level template that does:

  • provide local fake backend
  • provide fast replay executor
  • use real (past) market data
  • with a pre-defined small set of symbols, simulate a (constant) day using the historical data quickly, basically smoke test to catch any issues like typo.
@umitanuki
Copy link
Contributor Author

Although partially, it is now supported to run smoke testing with #21

@shlomiku
Copy link
Contributor

shlomiku commented Apr 21, 2020

I will add a pylivetrader command called smoke
it will have 2 options:

  1. generate a smoke test file for a gived algorithm
    2.. it will execute the generated smoke test upon the user's algorithm

so the workflow will be as such:
pylivetrader smoke generate --in-file algo.py --out-file smoke_algo.py
and execution will be
pylivetrader smoke run -f smoke_algo.py

or something similar

@shlomiku shlomiku self-assigned this Apr 21, 2020
@shlomiku shlomiku added the enhancement New feature or request label Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants