about summary refs log tree commit diff stats
path: root/README.md
blob: 97cf6f15972043f02c41fe456d6e15c6b335f24e (plain) (blame)
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
# TestReport

This is a python script, which creates an html test report out of a csv file.

# Usage

Execute the program like this:
```
.\create_report.py [-h] [-o output] [-c] input_path
```
The `input_path` points either to a executable, which outputs the csv to stdout, or to a csv (if the `-c` flag is set).

The program does not test for invalid inputs, the behaviour for these is undefined.

# CSV-Format
 
The format of the csv-input (header-row, types and example values):

| log_type  | timestamp | category | number | test_description | log_description |
| ---- | --- | --- | --- | --- | --- |
| `str`  | `str`  | `str` | `int` | `str` | `str` |
| SUCCESS  | 10 ms  | category_1 | 1 | description_1 | description_1_1 |

## log_type (string)

We differentiate between: "SUCCESS", "FAIL" and everything else (which will be dealt with as an info log).

## log_description (string)

The description for the specific log, which belongs to the testcase. The log description will not be printed, if the log type is a success.

# Example

<table>
<tr>
<th> Input </th>
<th> Output </th>
</tr>
<tr>
<td>

```
log_type,timestamp,category,number,test_description,fail_description
SUCCESS,"100 ms","category_1",1,"description_1",""
FAIL,"110 ms","category_2",1,"description_2","description_2_1"
INFO,"115 ms","category_2",2,"description_3","description_2_2"
SUCCESS,"120 ms","category_2",2,"description_4","description_2_3"
```

</td>
<td>

![output](example/example_output.png)

</td>
</tr>
</table>