Skip to content
BSTestRunner is an extension to the Python standard library's unittest module. It generates easy to use HTML test reports.
HTML Python
Branch: master
Clone or download
Pull request Compare This branch is 7 commits ahead of tungwaiyip:master.
Latest commit 7ee7685 Nov 19, 2017
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore add python3 support Nov 19, 2017
bs_test_result.html modify README Sep 27, 2016 fix issues in python3 and add demo Nov 19, 2017
demo_report.html fix issues in python3 and add demo Nov 19, 2017
report.png add screenshot Sep 27, 2016
sample_test_report.html updated sample to 0.8.2 Mar 28, 2011 fix issues in python3 and add demo Nov 19, 2017

BSTestRunner is bootstrap3 version of HTMLTestRunner

Now support both python2 and python3


How to use

A TestRunner for use with the Python unit testing framework. It generates a HTML report to show the result at a glance.

The simplest way to use this is to invoke its main method. E.g.

import unittest
import BSTestRunner

if __name__ == '__main__':

For more customization options, instantiates a BSTestRunner object. BSTestRunner is a counterpart to unittest's TextTestRunner. E.g.

# output to a file
fp = file('my_report.html', 'wb')
runner = BSTestRunner.BSTestRunner(
            title='My unit test',
            description='This demonstrates the report output by BSTestRunner.'

# Use an external stylesheet.
# See the Template_mixin class for more customizable options
runner.STYLESHEET_TMPL = '<link rel="stylesheet" href="my_stylesheet.css" type="text/css">'

# run the test
You can’t perform that action at this time.