Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build & Check Package
name: build & validate

on:
push:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Bump Version From PR Title
name: release

on:
pull_request:
Expand Down
26 changes: 20 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# robot-visualizer
# Robot Framework Visualizer
Keywords from this repository can visualize CSV data as graph within the robotframework log file.

## Statistics
Expand Down Expand Up @@ -29,14 +29,28 @@ pip install robotframework-visualizer

## Usage

```python
```robot
*** Settings ***
Library Visualizer


*** Test Cases ***
Visualize Data
${csv_file_path} = Keyword.Write Data To Csv
Visualizer.Add To Diagram ${csv_file_path} _time _value Value Axis Blue
Visualizer.Visualize
Add One Data Set
[Documentation] Add one graph to diagram.
Visualizer.Add To Diagramm ${CURDIR}${/}testdata${/}dummy_strom_spannung.csv _time _strom Strom Blue
Visualizer.Visualize Strom / Spannung Verlauf

Add Two Data Sets
[Documentation] Add two graphs to diagram.
Visualizer.Add To Diagramm ${CURDIR}${/}testdata${/}dummy_strom_spannung.csv _time _spannung Spannung Green
Visualizer.Add To Diagramm ${CURDIR}${/}testdata${/}dummy_strom_spannung.csv _time _strom Strom Blue
Visualizer.Visualize Strom / Spannung Verlauf
```

## Result

### Added one graph to diagram
![alt text](docs/one_graph.png)

### Added one graph to diagram
![alt text](docs/two_graphs.png)
Binary file added docs/one_graph.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/two_graphs.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 3 additions & 6 deletions src/Visualizer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,10 @@ class Visualizer(HybridCore):
"""
Visualizer Library for creating visual diagrams as embedded 'png' images in the Robot Framework log file.\n

= Current Implementation =
= Use Case =
The initial idea of the library was to create diagrams with the date time series on the x-axis & the raw value on the y-axis.\n
Currently, you need to pass the CSV header names into keyword to visualize the correct data.

= Future Implementation =
The future implementation idea is, to pass multiple CSV header names into the keyword to visualize more than one value time series on the y-axis.
The x-axis should be kept reserved for the datetime time-series.
You can pass a CSV file or data-object & create one or multiple graphs within a diagram.
First, you need to add data to a diagram & afterwards you can use ``Visualize`` keyword to create the diagram as png image.
"""

def __init__(self):
Expand Down
2 changes: 2 additions & 0 deletions tests/atest/generic.robot
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ Library Visualizer

*** Test Cases ***
Add One Data Set
[Documentation] Add one graph to diagram.
Visualizer.Add To Diagramm ${CURDIR}${/}testdata${/}dummy_strom_spannung.csv _time _strom Strom Blue
Visualizer.Visualize Strom / Spannung Verlauf

Add Two Data Sets
[Documentation] Add two graphs to diagram.
Visualizer.Add To Diagramm ${CURDIR}${/}testdata${/}dummy_strom_spannung.csv _time _spannung Spannung Green
Visualizer.Add To Diagramm ${CURDIR}${/}testdata${/}dummy_strom_spannung.csv _time _strom Strom Blue
Visualizer.Visualize Strom / Spannung Verlauf
Expand Down