File: README.md

package info (click to toggle)
junit2html 31.0.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 608 kB
  • sloc: xml: 3,208; python: 1,075; makefile: 6; sh: 5
file content (97 lines) | stat: -rw-r--r-- 2,343 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
junit2html by Ian Norton <inorton@gmail.com>
-------------------------------------------------------------

Hosted at https://gitlab.com/inorton/junit2html 

This is a simple self-contained python tool to
produce a single html file from a single junit xml file.

## Basic Usage:

```
$ junit2html JUNIT_XML_FILE [NEW_HTML_FILE]
```
or
```
$ python -m junit2htmlreport JUNIT_XML_FILE [NEW_HTML_FILE]
```

eg:

```
$ junit2html pytest-results.xml testrun.html
```
or
```
$ python -m junit2htmlreport pytest-results.xml
```

## Advanced Usage:

Render Text summary of results

```
junit2html mytest-results.xml --summary-matrix
```

Render Text sumamry of results and exit non-zero on failures

```
junit2html --summary-matrix ./tests/junit-unicode.xml --max-failures 1
```


# Installation

junit2html is installable via a variety of tools including python virtualenvs, pipx, poetry and others.

## Install via pipx
```
$ pipx install junit2html
```

## Install from source
```
$ pip install .
```
## Install from pypi
```
$ sudo pip install junit2html
```

## Example Outputs

You can see junit2html's own test report output content at:
https://gitlab.com/inorton/junit2html/-/jobs/artifacts/master/browse?job=python36

An an example of the "matrix" report output can be found at:
https://gitlab.com/inorton/junit2html/-/jobs/artifacts/master/file/tests/matrix-example.html?job=python39


About Junit
-----------

Junit is a widely used java test framework, it happens to produce a fairly
generic formatted test report and many non-java things produce the same files
(eg py.test) or can be converted quite easily to junit xml (cunit reports via 
xslt). The report files are understood by many things like Jenkins and various
 IDEs.

The format of junit files is described here: http://llg.cubic.org/docs/junit/

Source and Releases
-------------------

Junit2html is maintained on gitlab at https://gitlab.com/inorton/junit2html

The current master build status of junit2html is:
 [![pipeline status](https://gitlab.com/inorton/junit2html/badges/master/pipeline.svg)](https://gitlab.com/inorton/junit2html/commits/master)

The current coverage status is:
 [![coverage report](https://gitlab.com/inorton/junit2html/badges/master/coverage.svg)](https://gitlab.com/inorton/junit2html/commits/master)



Releases are availible via Pypi using pip