Giter VIP home page Giter VIP logo

django-jux's Introduction

Introduction

django-jux/JUXD is an attempt to get JUnit-style XML output from the Django test runner. It does a few notable things:

  • Uses the test runner from the django.utils.unittest abstraction layer (Django >= 1.3 required)
  • Does not redefine the behavior of the test suite's run method
  • Does not redefine the behavior of the test runner's run_suite method
  • Includes test suite run time as well as individual test run times
  • Supports all available unittest2 outcomes (success, failure, error, etc...)
  • Works with builtin ElementTree to generate the XML output

This job can be done using nose's xunit plugin, but with the unittest improvements in Python 2.7, my only reason for using nose was for the xunit plugin itself. nose is a bit of a heavy hitter, but it's a (really good) generic test runner, not django specific. I wanted something a little more targeted, and this is the result.

The main motivator behind this was getting test output into Jenkins CI, which works perfectly.

Installation

Install Django >=1.6 and set up a project. Then, in your django project settings:

# Tell Django to use the JUXD Test Suite Runner
TEST_RUNNER = 'juxd.JUXDTestSuiteRunner'
# Where to write the output
JUXD_FILENAME = '/path/to/junit.xml'

Thanks

This module pulls inspiration from a lot of sources, and credit is due to all of them:

django-jux's People

Contributors

barqshasbite avatar

Watchers

James Cloos avatar  avatar  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.