Coder Social home page Coder Social logo

lissizza / django-coverage Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kmike/django-coverage

0.0 1.0 0.0 375 KB

Yet another django test coverage app with nice custom html reports. The official git mirror.

Home Page: https://bitbucket.org/kmike/django-coverage

License: Apache License 2.0

Python 100.00%

django-coverage's Introduction

Django Test Coverage App

A test coverage reporting tool that utilizes Ned Batchelder's excellent coverage.py to show how much of your code is exercised with your tests.

  • Django 1.2 and above. For earlier versions, try version 1.0.3 of django-coverage.
  • coverage.py
  1. Place the entire django_coverage app in your third-party apps directory.
  2. Update your settings.INSTALLED_APPS to include django_coverage.
  3. Include test coverage specific settings in your own settings file. See settings.py for more detail.

Once you've completed all the steps, you'll have a new custom command available to you via manage.py test_coverage. It works just like manage.py test.

You don't have to install django_coverage as an app if you don't want to. You can simply use the test runner if you like.

  1. Update settings.TEST_RUNNER = 'django_coverage.coverage_runner.CoverageRunner'
  2. Include test coverage specific settings in your own settings file. See settings.py for more detail.
  3. Run manage.py test like you normally do.

django_coverage will also generate a badge image that represents the percentage coverage that your project has.

This will be stored in the same directory as the coverage report data: $PROJECT/.coverage/coverage_status.png.

Currently, the only badge type that is included is drone.io. When other types are included, you will be able to select which is used by settings.COVERAGE_BADGE_TYPE.

To prevent the badge generation, you could set this to None.

Using the coverage badge with drone.io

drone.io has no native support for coverage reporting. However, you can save build artifacts: just tell it to save one called: .coverage/coverage_status.png. Then you can reference it in your project's README.

And that's it.

django-coverage's People

Contributors

bergantine avatar charettes avatar izimobil avatar kmike avatar lissizza avatar muhuk avatar noxan avatar randalldegges-okta-2 avatar schinckel avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.