README.md (view raw)
1# TestReport
2
3This is a python script, which creates an html test report out of a csv file.
4
5# Usage
6
7Execute the program like this:
8```
9.\create_report.py [-h] [-o output] [-c] input_path
10```
11The `input_path` points either to a executable, which outputs the csv to stdout, or to a csv (if the `-c` flag is set).
12
13The program does not test for invalid inputs, the behaviour for these is undefined.
14
15# CSV-Format
16
17The format of the csv-input (header-row, types and example values):
18
19| log_type | timestamp | category | number | test_description | log_description |
20| ---- | --- | --- | --- | --- | --- |
21| `str` | `str` | `str` | `int` | `str` | `str` |
22| SUCCESS | 10 ms | category_1 | 1 | description_1 | description_1_1 |
23
24## log_type (string)
25
26We differentiate between: "SUCCESS", "FAIL" and everything else (which will be dealt with as an info log).
27
28## log_description (string)
29
30The description for the specific log, which belongs to the testcase. The log description will not be printed, if the log type is a success.
31
32# Example
33
34<table>
35<tr>
36<th> Input </th>
37<th> Output </th>
38</tr>
39<tr>
40<td>
41
42```
43log_type,timestamp,category,number,test_description,fail_description
44SUCCESS,"100 ms","category_1",1,"description_1",""
45FAIL,"110 ms","category_2",1,"description_2","description_2_1"
46INFO,"115 ms","category_2",2,"description_3","description_2_2"
47SUCCESS,"120 ms","category_2",2,"description_4","description_2_3"
48```
49
50</td>
51<td>
52
53
54
55</td>
56</tr>
57</table>