From 35a9445c5fdea5842175f163d6f7bac1e41f7dc8 Mon Sep 17 00:00:00 2001 From: Christian Krinitsin Date: Wed, 9 Apr 2025 09:11:52 +0000 Subject: Update README.md: fix usage and add example --- README.md | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index faad3f7..1e4253b 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,13 @@ This is a python script, which creates an html test report out of a csv file. Execute the program like this: ``` -.\create_report.py [-h] [-o output] exe_path +usage: .\create_report.py [-h] [-o output] [-c] input_path ``` -The exe_path points to an executable, which outputs the data in the following csv file format in stdout. - -# CSV-Format +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): @@ -23,8 +23,23 @@ The format of the csv-input (header-row, types and example values): ## log_type (string) -We differentiate between: "SUCCESS", "FAIL" and everything else (which well be dealt with as an info log). +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. \ No newline at end of file +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 + +Input: + +``` +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" +``` + +Output: +![output](example/example_output.png) \ No newline at end of file -- cgit 1.4.1