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

Backend Tests #172

Closed
Qqwy opened this issue Apr 24, 2018 · 2 comments
Closed

Backend Tests #172

Qqwy opened this issue Apr 24, 2018 · 2 comments
Assignees
Labels
back-end This issue is part of the back-end (Python part) of the application. testing

Comments

@Qqwy
Copy link
Collaborator

Qqwy commented Apr 24, 2018

Here is a list of things we want to test.

Please add any ideas to this list as well.

These can actually be implemented in separate PRs or sub-issues by different people. This issue is to track the overall effort.

Things we test

  • User entity (doctests)
  • User repository (doctests)
  • Dashboard entity (doctests)
  • Dashboard repository (doctests)
  • Endpoint entity (doctests)
  • EndpointCall entity (doctests)
  • Aggregator (doctests)
  • Aggregator (property tests)
  • Task scheduling
  • dashboard_fetch: Parsing responses of remote flask-monitoring-dashboard.

Things we explicitly do not test

  • the pydash_web API. Makes it easier to change things around i.c.m. with front-end. At some point we might want a couple of regression tests, but these should mostly be covered by front-end integration tests.
@Qqwy Qqwy added back-end This issue is part of the back-end (Python part) of the application. testing labels Apr 24, 2018
@Qqwy Qqwy added this to the Sprint #4 milestone Apr 24, 2018
@Qqwy
Copy link
Collaborator Author

Qqwy commented Apr 26, 2018

Inside PR #176 a start has been made:


----------- coverage: platform linux, python 3.6.4-final-0 -----------
Name                                          Stmts   Miss  Cover   Missing
---------------------------------------------------------------------------
periodic_tasks/__init__.py                       24      6    75%   117-121, 142, 147
periodic_tasks/pqdict_iter_upto_priority.py      13      1    92%   25
periodic_tasks/queue_nonblocking_iter.py         11      0   100%
periodic_tasks/task_scheduler.py                102      2    98%   319-320
pydash_app/__init__.py                           17      5    71%   16, 20, 32-35
pydash_app/dashboard/__init__.py                  6      2    67%   15, 24
pydash_app/dashboard/aggregator.py               31      0   100%
pydash_app/dashboard/dashboard.py                34      6    82%   56, 69, 72, 91, 104, 118
pydash_app/dashboard/endpoint.py                 25      5    80%   20, 30, 33, 49, 52
pydash_app/dashboard/endpoint_call.py            28      0   100%
pydash_app/dashboard/repository.py               39     24    38%   29-39, 47-52, 57-63, 66-68
pydash_app/dashboard/services/__init__.py         0      0   100%
pydash_app/dashboard/services/fetching.py        91     72    21%   21-25, 36-37, 51-55, 65-77, 84-95, 105-108, 118-124, 136-161, 169-186, 198-216
pydash_app/dashboard/services/seeding.py         13      8    38%   22-57
pydash_app/user/__init__.py                      18      0   100%
pydash_app/user/repository.py                    36      0   100%
pydash_app/user/services/__init__.py              0      0   100%
pydash_app/user/services/seeding.py               9      6    33%   17-34
pydash_app/user/user.py                          20      0   100%
---------------------------------------------------------------------------
TOTAL                                           517    137    74%

====================================== 20 passed in 5.90 seconds =======================================
  • The User Entity, Repository and API now contains a 100% coverage.
  • The Dashboard Endity, Repository and API contains quite a bit of coverage.
  • The Task Scheduling stuff contains a 98% of coverage (although running the script multiple times might give slightly varying coverage-numbers because most of the scheduling stuff is run in separate OS processes which coverage.py is not able to always pick up properly).

@TheVeggydude TheVeggydude self-assigned this Apr 28, 2018
@Qqwy
Copy link
Collaborator Author

Qqwy commented Apr 30, 2018

Should be closed once backend/tests is merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
back-end This issue is part of the back-end (Python part) of the application. testing
Projects
None yet
Development

No branches or pull requests

2 participants