Page MenuHomePhabricator

Unit tests for the awmd-stats tool
Open, NormalPublic

Description

Unit tests scripts for testing the functionality of the application. All methods should be tested and tests coverage should be 100% 👍

  • Test all routes - (in case you see a route which is not tested, just write a patch for it)
  • Test all UD methods.

Unit test report
Generate this using the command pytest -v tests/ in the root directory of the project.
Report on 22nd Dec, 2018

collected 21 items                                                                                                               

.....................

========== 21 passed in 231.24 seconds ==================

Test coverage report
Run pytest --cov=. tests/ in the project's root directory.
Report on 22nd Dec, 2018

collected 21 items                                                                                                               

---------- coverage: platform darwin, python 3.7.1-final-0 -----------
Name                    Stmts   Miss  Cover
-------------------------------------------
awmdstats/__init__.py       0      0   100%
awmdstats/app.py          101      7    93%
awmdstats/settings.py      10     10     0%
awmdstats/utils.py         89      2    98%
manage.py                  10     10     0%
tests/__init__.py           0      0   100%
tests/conftest.py           6      0   100%
tests/test_app.py          26      0   100%
tests/test_utils.py        52      0   100%
-------------------------------------------
TOTAL                     294     29    90%


============================= 21 passed in 242.46 seconds ============================

Imported from issue #15 of previous repo on Github

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 19 2018, 11:29 AM

Change 453703 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[labs/tools/awmd-stats@master] Add unit tests for some routes

https://gerrit.wikimedia.org/r/453703

D3r1ck01 triaged this task as Normal priority.Aug 19 2018, 12:04 PM

Change 453703 merged by D3r1ck01:
[labs/tools/awmd-stats@master] Add unit tests for some routes

https://gerrit.wikimedia.org/r/453703

samuelguebo updated the task description. (Show Details)Aug 19 2018, 8:02 PM
samuelguebo updated the task description. (Show Details)
D3r1ck01 updated the task description. (Show Details)Aug 21 2018, 5:41 PM
D3r1ck01 updated the task description. (Show Details)Aug 21 2018, 5:44 PM
D3r1ck01 updated the task description. (Show Details)
D3r1ck01 updated the task description. (Show Details)
D3r1ck01 updated the task description. (Show Details)
D3r1ck01 updated the task description. (Show Details)

Change 454331 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[labs/tools/awmd-stats@master] Modularizing unit test for ease of code readability

https://gerrit.wikimedia.org/r/454331

Change 454331 merged by jenkins-bot:
[labs/tools/awmd-stats@master] Modularizing unit test for ease of code readability

https://gerrit.wikimedia.org/r/454331

Change 455146 had a related patch set uploaded (by African Hope; owner: African Hope):
[labs/tools/awmd-stats@master] Added some unit tests for UD methods

https://gerrit.wikimedia.org/r/455146

Change 455146 merged by jenkins-bot:
[labs/tools/awmd-stats@master] Add some unit tests for UD methods

https://gerrit.wikimedia.org/r/455146

D3r1ck01 updated the task description. (Show Details)Oct 4 2018, 12:13 PM
D3r1ck01 awarded a token.
D3r1ck01 updated the task description. (Show Details)Oct 4 2018, 12:24 PM
D3r1ck01 updated the task description. (Show Details)Oct 4 2018, 12:32 PM

Change 464468 had a related patch set uploaded (by D3r1ck01; owner: Alangi Derick):
[labs/tools/awmd-stats@master] [IMPR][CLEANUP] Add charts to the landing page plus some fixes

https://gerrit.wikimedia.org/r/464468

samuelguebo updated the task description. (Show Details)Oct 4 2018, 9:35 PM

Change 464468 merged by African Hope:
[labs/tools/awmd-stats@master] [IMPR][CLEANUP] Add charts to the landing page plus some fixes

https://gerrit.wikimedia.org/r/464468

Change 476925 had a related patch set uploaded (by African Hope; owner: African Hope):
[labs/tools/awmd-stats@master] [IMPR] Add new test methods

https://gerrit.wikimedia.org/r/476925

Change 476925 merged by jenkins-bot:
[labs/tools/awmd-stats@master] [IMPR] Add new test methods

https://gerrit.wikimedia.org/r/476925

Change 480665 had a related patch set uploaded (by African Hope; owner: African Hope):
[labs/tools/awmd-stats@master] [FIX] Adjust test method getContributors()

https://gerrit.wikimedia.org/r/480665

Change 480665 merged by jenkins-bot:
[labs/tools/awmd-stats@master] [FIX] Adjust test method getContributors()

https://gerrit.wikimedia.org/r/480665

Today's run

-------------------------------------------
TOTAL                     294     29    90%

10% more to go! :)

D3r1ck01 updated the task description. (Show Details)Dec 22 2018, 6:30 PM
D3r1ck01 updated the task description. (Show Details)
D3r1ck01 removed subscribers: gerritbot, Aklapper.