|  | 
| 1 |  | -# htmloutputparallel | 
| 2 |  | -nose plugin for html output works with parallel test (--processes=N) | 
|  | 1 | +# HTML Output Parallel (htmloutputparallel) | 
|  | 2 | +## Why another nose plugin | 
|  | 3 | +I really **need** the HTML test report | 
|  | 4 | + | 
|  | 5 | +I really **like** run nose test in parallel (--processes=N) | 
|  | 6 | + | 
|  | 7 | +After seaching and trying all nose html output plugin from pip, I found zero plugin I can use with nose --processes=N. | 
|  | 8 | + | 
|  | 9 | +So I dicide to write one myself. The output HTML is build on from jinja2, so it's easy to modify the template or user totally different template for different report.  | 
|  | 10 | + | 
|  | 11 | +##Install | 
|  | 12 | +``` | 
|  | 13 | +python setup.py install | 
|  | 14 | +``` | 
|  | 15 | + | 
|  | 16 | +##Parameters  | 
|  | 17 | + | 
|  | 18 | +Parameter | Environment Variable| Description | Required | 
|  | 19 | +---------|---------|--------|---------- | 
|  | 20 | +--with-html-output | NOSE\_WITH\_HTML\_OUTPUT | enable html output plugin | YES | 
|  | 21 | +--html-out-file | NOSE\_HTML\_OUT\_FILE | set output filename. default is "results.html" | NO | 
|  | 22 | +--html-jinja-template| NOSE\_HTML\_JINJA\_TEMPLATE |use different jinja template instead default | NO | 
|  | 23 | +--html-out-title | NOSE\_HTML\_OUT\_TITLE | HTML title and header | NO | 
|  | 24 | + | 
|  | 25 | +##Examples | 
|  | 26 | +Generate normal report to save results.html | 
|  | 27 | + | 
|  | 28 | +``` | 
|  | 29 | +nosetests --with-html-output | 
|  | 30 | +``` | 
|  | 31 | +Generate report and save to mytest.html with 2 processes  | 
|  | 32 | + | 
|  | 33 | +``` | 
|  | 34 | +nosetests --with-html-output --html-out-file=mytest.html --processes=2 | 
|  | 35 | +``` | 
|  | 36 | +Generate report and save to test2.html and use /tmp/new_test.jinja template with 4 processes in parallel | 
|  | 37 | + | 
|  | 38 | +``` | 
|  | 39 | +nosetests --with-html-output --html-out-file=test2.html --html-jinja-tempalte=/tmp/new_test.jinja --processes=4 | 
|  | 40 | +``` | 
|  | 41 | + | 
|  | 42 | +Generate report with html title/header = "Sunday Test" and save to sunday.html | 
|  | 43 | + | 
|  | 44 | +``` | 
|  | 45 | +nosetests --with-html-output --html-out-file=sunday.html --html-out-title="Sunday Test" | 
|  | 46 | +``` | 
|  | 47 | +  | 
|  | 48 | +##Todo | 
|  | 49 | +once I learnd how, I will try to put it on pip. so installation would be easier  | 
|  | 50 | + | 
|  | 51 | + | 
0 commit comments