Web: Increase backend test coverage

Created on 5 Dec 2017  路  4Comments  路  Source: gitcoinco/web

Backend Testing and Coverage

  • Travis and Codecov integrations are now live.
  • Testing coverage for the backend code is currently at: codecov

If you're interested in contributing to the initiative to increase our percentage, you should familiarize yourself with django and pytest test writing.

Useful documentation

Additional information on testing Django with pytest:

Considerations:

Please break up your test coverage pull requests by app/file when possible.

Example implementation:

If you intend on writing test coverage for dashboard/views.py, you could:

  • Create dashboard/tests/ directory.
  • Add __init__.py file to dashboard/tests
  • Add test_views.py
  • If factories will be used, add the dashboard/tests/factories.py file to define the factories to be used.

  • [x] Implement automated testing and coverage reports

Completed in #102: The goal of this discussion is to build consensus around an approach to backend/django testing.
We'll want to make use of the Django testing suite and probably implement further testing functionality via:

  • pytest

Following successful implementation of a base testing suite, I assume we will want to automate test builds and coverage testing with something like:

Feel free to disagree with any of the above suggestions, they are merely to get a discussion going.

discussion

Most helpful comment

this is enough of an organizational priority i am happy to throw some bounty money at it once we have specced it

All 4 comments

this is enough of an organizational priority i am happy to throw some bounty money at it once we have specced it

travis \m/
@mbeacom if you need help in setting this up, I'm here. (Never done it before, so expect annoying pings if you agree to this )

do we still need this live now that codecov/ travis are integrated? might be a good oppy to change issue title to 'increase test coverage'

@mbeacom do we still need this issue?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

christianbundy picture christianbundy  路  3Comments

owocki picture owocki  路  4Comments

abitrolly picture abitrolly  路  4Comments

IgorPerikov picture IgorPerikov  路  3Comments

kziemianek picture kziemianek  路  3Comments