robotframework-trace 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- robotframework_trace-1.0.0/LICENSE +21 -0
- robotframework_trace-1.0.0/PKG-INFO +184 -0
- robotframework_trace-1.0.0/README.md +161 -0
- robotframework_trace-1.0.0/pyproject.toml +55 -0
- robotframework_trace-1.0.0/robot_trace/PrintVisits.py +43 -0
- robotframework_trace-1.0.0/robot_trace/PrintVisitsV2.py +44 -0
- robotframework_trace-1.0.0/robot_trace/RobotTrace.py +664 -0
- robotframework_trace-1.0.0/robot_trace/__init__.py +4 -0
- robotframework_trace-1.0.0/robot_trace/runner.py +118 -0
- robotframework_trace-1.0.0/robotframework_trace.egg-info/PKG-INFO +184 -0
- robotframework_trace-1.0.0/robotframework_trace.egg-info/SOURCES.txt +15 -0
- robotframework_trace-1.0.0/robotframework_trace.egg-info/dependency_links.txt +1 -0
- robotframework_trace-1.0.0/robotframework_trace.egg-info/entry_points.txt +2 -0
- robotframework_trace-1.0.0/robotframework_trace.egg-info/requires.txt +7 -0
- robotframework_trace-1.0.0/robotframework_trace.egg-info/top_level.txt +3 -0
- robotframework_trace-1.0.0/setup.cfg +4 -0
- robotframework_trace-1.0.0/tests/unit/test_cliprogress.py +443 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Jonathan Simmonds
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: robotframework-trace
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Alternative CLI for Robot Framework
|
|
5
|
+
Author-email: Jonathan Simmonds <jon@jonsim.com>
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/jonsim/robot-trace
|
|
8
|
+
Project-URL: Repository, https://github.com/jonsim/robot-trace.git
|
|
9
|
+
Project-URL: Issues, https://github.com/jonsim/robot-trace/issues
|
|
10
|
+
Keywords: robotframework,listener,cli,trace
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Requires-Python: >=3.6
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Provides-Extra: dev
|
|
17
|
+
Requires-Dist: robotframework; extra == "dev"
|
|
18
|
+
Requires-Dist: pre-commit; extra == "dev"
|
|
19
|
+
Requires-Dist: coverage; extra == "dev"
|
|
20
|
+
Requires-Dist: build; extra == "dev"
|
|
21
|
+
Requires-Dist: twine; extra == "dev"
|
|
22
|
+
Dynamic: license-file
|
|
23
|
+
|
|
24
|
+
# RobotFramework CLI Progress Listener
|
|
25
|
+
|
|
26
|
+
A lightweight Robot Framework listener that provides real-time progress updates
|
|
27
|
+
directly on the command-line during test execution. The main design intention is
|
|
28
|
+
you don't need to open the HTML files directly to debug failing tests.
|
|
29
|
+
|
|
30
|
+
## Features
|
|
31
|
+
- Displays test execution progress in the CLI.
|
|
32
|
+
- Provides a clear and concise overview of running tests.
|
|
33
|
+
- Provides a full, intuitive trace of any failing tests.
|
|
34
|
+
|
|
35
|
+
## Usage
|
|
36
|
+
The listener supports three different usage models:
|
|
37
|
+
|
|
38
|
+
### 1. As a separate command-line tool
|
|
39
|
+
This is the easiest and recommended usage model.
|
|
40
|
+
|
|
41
|
+
#### Installation
|
|
42
|
+
```sh
|
|
43
|
+
pip install robotframework-trace
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
#### Usage
|
|
47
|
+
```sh
|
|
48
|
+
robot-trace path/to/tests
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
#### Details
|
|
52
|
+
You don't need to remember any extra arguments to pass to Robot - the runner
|
|
53
|
+
automatically passes the correct arguments to Robot and bases its own command
|
|
54
|
+
line from the arguments you pass to Robot. This gives a drop-in replacement
|
|
55
|
+
for any existing `robot` command lines.
|
|
56
|
+
|
|
57
|
+
The `robot-trace` command is a very thin wrapper on top of `robot` - it passes all
|
|
58
|
+
arguments it receives straight through, while adding additional arguments to
|
|
59
|
+
ensure the listener output works properly.
|
|
60
|
+
|
|
61
|
+
Robot's standard `--consolewidth` and `--consolecolors` arguments control the
|
|
62
|
+
listener's output; their behavior matches Robot's documentation.
|
|
63
|
+
|
|
64
|
+
`robot-trace` also introduces its own custom arguments that are consumed (matching
|
|
65
|
+
Robot's argument parsing conventions regarding case insensitivity and
|
|
66
|
+
hyphenation) before passing the command line to Robot:
|
|
67
|
+
- `--verbose`: Sets the listener verbosity to `DEBUG` verbosity. Traces from all
|
|
68
|
+
tests are printed.
|
|
69
|
+
- `--quiet`: Sets the listener verbosity to `QUIET` verbosity. Only traces from
|
|
70
|
+
failing tests are printed. Passing tests that raise warnings or errors are
|
|
71
|
+
not printed.
|
|
72
|
+
- `--consoleprogress <value>`: Controls where the progress box is printed.
|
|
73
|
+
Valid values are `AUTO`, `STDOUT`, `STDERR`, `NONE` (to suppress it). Defaults
|
|
74
|
+
to `AUTO`, which will print to `stdout` or `stderr` if they haven't been
|
|
75
|
+
redirected, or suppress it otherwise.
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### 2. As a module-based Robot listener
|
|
79
|
+
If you want to keep using `robot` directly, you can use the listener as a
|
|
80
|
+
module.
|
|
81
|
+
|
|
82
|
+
#### Installation
|
|
83
|
+
```sh
|
|
84
|
+
pip install robotframework-trace
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
#### Usage
|
|
88
|
+
When calling the listener directly, ensure you call Robot with `--console=none`
|
|
89
|
+
to avoid Robot's default console markers getting interleaved.
|
|
90
|
+
```sh
|
|
91
|
+
robot --listener robot_trace --console=none path/to/tests
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
#### Details
|
|
95
|
+
The listener supports the following arguments:
|
|
96
|
+
- `verbosity=<value>`: takes a string value to set the listener's verbosity.
|
|
97
|
+
Valid values are `DEBUG` (print traces from all tests), `NORMAL` (print traces
|
|
98
|
+
from failing, warning, and erroring tests), `QUIET` (print traces from failing
|
|
99
|
+
tests). Defaults to `NORMAL`.
|
|
100
|
+
- `colors=<value>`: takes a string value to control whether or not the output is
|
|
101
|
+
colorized. Valid values are `AUTO`, `ON`, `ANSI`, `OFF`. Values behave the same
|
|
102
|
+
as Robot's `--consolecolors` argument. Defaults to `AUTO`.
|
|
103
|
+
- `console_progress=<value>`: Controls where the progress box is printed. Valid
|
|
104
|
+
values are `AUTO`, `STDOUT`, `STDERR`, `NONE` (to suppress it). Defaults to
|
|
105
|
+
`AUTO`, which will print to `stdout` or `stderr` if they haven't been
|
|
106
|
+
redirected, or suppress it otherwise.
|
|
107
|
+
- `width=<value>`: Controls the width of the progress box. Defaults to `120`.
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
### 3. As a single-file Robot listener
|
|
111
|
+
If you don't want to install the package, the listener is implemented as a
|
|
112
|
+
single file which you can deploy standalone. This is useful for minimal setups
|
|
113
|
+
or for embedding the listener in your own projects, but you lose the ability to
|
|
114
|
+
update via `pip`.
|
|
115
|
+
|
|
116
|
+
#### Installation
|
|
117
|
+
Copy `robot_trace/RobotTrace.py` to your project directory.
|
|
118
|
+
|
|
119
|
+
#### Usage
|
|
120
|
+
Usage is identical to option 2, except using the file not the module:
|
|
121
|
+
```sh
|
|
122
|
+
robot --listener RobotTrace.py --console=none path/to/tests
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
### Related options
|
|
127
|
+
You may also consider calling `robot` or `robot-trace` with:
|
|
128
|
+
- `--maxerrorlines=10000` to avoid truncating all but the longest error
|
|
129
|
+
messages.
|
|
130
|
+
- `--maxassignlength=10000` to avoid truncating all but the longest variables.
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
## Example Output
|
|
134
|
+
```sh
|
|
135
|
+
$ robot-trace tests/minimal_testcases
|
|
136
|
+
TEST FAILED: Nested Keywords.Nested Failing Test Case
|
|
137
|
+
═════════════════════════════════════════════════════
|
|
138
|
+
▶ Level Two Keyword('should_fail=${True}')
|
|
139
|
+
▶ BuiltIn.Log('In the level two keyword')
|
|
140
|
+
I In the level two keyword
|
|
141
|
+
✓ PASS 0s
|
|
142
|
+
▶ Level Three Keyword()
|
|
143
|
+
▶ BuiltIn.Log('In the level three keyword')
|
|
144
|
+
I In the level three keyword
|
|
145
|
+
✓ PASS 0s
|
|
146
|
+
✓ PASS 0s
|
|
147
|
+
▶ Failing Keyword()
|
|
148
|
+
▶ BuiltIn.Log('In the failing keyword')
|
|
149
|
+
I In the failing keyword
|
|
150
|
+
✓ PASS 0s
|
|
151
|
+
▶ BuiltIn.Fail('This keyword failed')
|
|
152
|
+
F This keyword failed
|
|
153
|
+
✗ FAIL 0s
|
|
154
|
+
✗ FAIL 0s
|
|
155
|
+
✗ FAIL 0s
|
|
156
|
+
|
|
157
|
+
┌──────────────────────────────────────────────────────────────────────┐
|
|
158
|
+
│ [SUITE 2/ 2] Suite 2 │
|
|
159
|
+
│ [TEST 11/16] Test Case 3 - Slow (elapsed 4s, ETA 3s) │
|
|
160
|
+
│ [Sleep] '${DELAY_LONG}' │
|
|
161
|
+
└──────────────────────────────────────────────────────────────────────┘
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Requirements
|
|
165
|
+
- Python 3.6+
|
|
166
|
+
- Robot Framework 5.0+
|
|
167
|
+
|
|
168
|
+
The script has no dependencies beyond the standard library. On Windows to get
|
|
169
|
+
colorized output, you need to install the `colorama` package, however the script
|
|
170
|
+
will work without it.
|
|
171
|
+
|
|
172
|
+
The script has no direct dependency on `robotframework` itself, but obviously it
|
|
173
|
+
doesn't do much without it installed.
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
## Contributing
|
|
177
|
+
Contributions, bugs, and feature requests are welcome! Please see the
|
|
178
|
+
[Contributing Guide](CONTRIBUTING.md) for details on how to build the project
|
|
179
|
+
locally and submit changes.
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
## License
|
|
183
|
+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file
|
|
184
|
+
for details.
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# RobotFramework CLI Progress Listener
|
|
2
|
+
|
|
3
|
+
A lightweight Robot Framework listener that provides real-time progress updates
|
|
4
|
+
directly on the command-line during test execution. The main design intention is
|
|
5
|
+
you don't need to open the HTML files directly to debug failing tests.
|
|
6
|
+
|
|
7
|
+
## Features
|
|
8
|
+
- Displays test execution progress in the CLI.
|
|
9
|
+
- Provides a clear and concise overview of running tests.
|
|
10
|
+
- Provides a full, intuitive trace of any failing tests.
|
|
11
|
+
|
|
12
|
+
## Usage
|
|
13
|
+
The listener supports three different usage models:
|
|
14
|
+
|
|
15
|
+
### 1. As a separate command-line tool
|
|
16
|
+
This is the easiest and recommended usage model.
|
|
17
|
+
|
|
18
|
+
#### Installation
|
|
19
|
+
```sh
|
|
20
|
+
pip install robotframework-trace
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
#### Usage
|
|
24
|
+
```sh
|
|
25
|
+
robot-trace path/to/tests
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
#### Details
|
|
29
|
+
You don't need to remember any extra arguments to pass to Robot - the runner
|
|
30
|
+
automatically passes the correct arguments to Robot and bases its own command
|
|
31
|
+
line from the arguments you pass to Robot. This gives a drop-in replacement
|
|
32
|
+
for any existing `robot` command lines.
|
|
33
|
+
|
|
34
|
+
The `robot-trace` command is a very thin wrapper on top of `robot` - it passes all
|
|
35
|
+
arguments it receives straight through, while adding additional arguments to
|
|
36
|
+
ensure the listener output works properly.
|
|
37
|
+
|
|
38
|
+
Robot's standard `--consolewidth` and `--consolecolors` arguments control the
|
|
39
|
+
listener's output; their behavior matches Robot's documentation.
|
|
40
|
+
|
|
41
|
+
`robot-trace` also introduces its own custom arguments that are consumed (matching
|
|
42
|
+
Robot's argument parsing conventions regarding case insensitivity and
|
|
43
|
+
hyphenation) before passing the command line to Robot:
|
|
44
|
+
- `--verbose`: Sets the listener verbosity to `DEBUG` verbosity. Traces from all
|
|
45
|
+
tests are printed.
|
|
46
|
+
- `--quiet`: Sets the listener verbosity to `QUIET` verbosity. Only traces from
|
|
47
|
+
failing tests are printed. Passing tests that raise warnings or errors are
|
|
48
|
+
not printed.
|
|
49
|
+
- `--consoleprogress <value>`: Controls where the progress box is printed.
|
|
50
|
+
Valid values are `AUTO`, `STDOUT`, `STDERR`, `NONE` (to suppress it). Defaults
|
|
51
|
+
to `AUTO`, which will print to `stdout` or `stderr` if they haven't been
|
|
52
|
+
redirected, or suppress it otherwise.
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### 2. As a module-based Robot listener
|
|
56
|
+
If you want to keep using `robot` directly, you can use the listener as a
|
|
57
|
+
module.
|
|
58
|
+
|
|
59
|
+
#### Installation
|
|
60
|
+
```sh
|
|
61
|
+
pip install robotframework-trace
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
#### Usage
|
|
65
|
+
When calling the listener directly, ensure you call Robot with `--console=none`
|
|
66
|
+
to avoid Robot's default console markers getting interleaved.
|
|
67
|
+
```sh
|
|
68
|
+
robot --listener robot_trace --console=none path/to/tests
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### Details
|
|
72
|
+
The listener supports the following arguments:
|
|
73
|
+
- `verbosity=<value>`: takes a string value to set the listener's verbosity.
|
|
74
|
+
Valid values are `DEBUG` (print traces from all tests), `NORMAL` (print traces
|
|
75
|
+
from failing, warning, and erroring tests), `QUIET` (print traces from failing
|
|
76
|
+
tests). Defaults to `NORMAL`.
|
|
77
|
+
- `colors=<value>`: takes a string value to control whether or not the output is
|
|
78
|
+
colorized. Valid values are `AUTO`, `ON`, `ANSI`, `OFF`. Values behave the same
|
|
79
|
+
as Robot's `--consolecolors` argument. Defaults to `AUTO`.
|
|
80
|
+
- `console_progress=<value>`: Controls where the progress box is printed. Valid
|
|
81
|
+
values are `AUTO`, `STDOUT`, `STDERR`, `NONE` (to suppress it). Defaults to
|
|
82
|
+
`AUTO`, which will print to `stdout` or `stderr` if they haven't been
|
|
83
|
+
redirected, or suppress it otherwise.
|
|
84
|
+
- `width=<value>`: Controls the width of the progress box. Defaults to `120`.
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
### 3. As a single-file Robot listener
|
|
88
|
+
If you don't want to install the package, the listener is implemented as a
|
|
89
|
+
single file which you can deploy standalone. This is useful for minimal setups
|
|
90
|
+
or for embedding the listener in your own projects, but you lose the ability to
|
|
91
|
+
update via `pip`.
|
|
92
|
+
|
|
93
|
+
#### Installation
|
|
94
|
+
Copy `robot_trace/RobotTrace.py` to your project directory.
|
|
95
|
+
|
|
96
|
+
#### Usage
|
|
97
|
+
Usage is identical to option 2, except using the file not the module:
|
|
98
|
+
```sh
|
|
99
|
+
robot --listener RobotTrace.py --console=none path/to/tests
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
### Related options
|
|
104
|
+
You may also consider calling `robot` or `robot-trace` with:
|
|
105
|
+
- `--maxerrorlines=10000` to avoid truncating all but the longest error
|
|
106
|
+
messages.
|
|
107
|
+
- `--maxassignlength=10000` to avoid truncating all but the longest variables.
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
## Example Output
|
|
111
|
+
```sh
|
|
112
|
+
$ robot-trace tests/minimal_testcases
|
|
113
|
+
TEST FAILED: Nested Keywords.Nested Failing Test Case
|
|
114
|
+
═════════════════════════════════════════════════════
|
|
115
|
+
▶ Level Two Keyword('should_fail=${True}')
|
|
116
|
+
▶ BuiltIn.Log('In the level two keyword')
|
|
117
|
+
I In the level two keyword
|
|
118
|
+
✓ PASS 0s
|
|
119
|
+
▶ Level Three Keyword()
|
|
120
|
+
▶ BuiltIn.Log('In the level three keyword')
|
|
121
|
+
I In the level three keyword
|
|
122
|
+
✓ PASS 0s
|
|
123
|
+
✓ PASS 0s
|
|
124
|
+
▶ Failing Keyword()
|
|
125
|
+
▶ BuiltIn.Log('In the failing keyword')
|
|
126
|
+
I In the failing keyword
|
|
127
|
+
✓ PASS 0s
|
|
128
|
+
▶ BuiltIn.Fail('This keyword failed')
|
|
129
|
+
F This keyword failed
|
|
130
|
+
✗ FAIL 0s
|
|
131
|
+
✗ FAIL 0s
|
|
132
|
+
✗ FAIL 0s
|
|
133
|
+
|
|
134
|
+
┌──────────────────────────────────────────────────────────────────────┐
|
|
135
|
+
│ [SUITE 2/ 2] Suite 2 │
|
|
136
|
+
│ [TEST 11/16] Test Case 3 - Slow (elapsed 4s, ETA 3s) │
|
|
137
|
+
│ [Sleep] '${DELAY_LONG}' │
|
|
138
|
+
└──────────────────────────────────────────────────────────────────────┘
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Requirements
|
|
142
|
+
- Python 3.6+
|
|
143
|
+
- Robot Framework 5.0+
|
|
144
|
+
|
|
145
|
+
The script has no dependencies beyond the standard library. On Windows to get
|
|
146
|
+
colorized output, you need to install the `colorama` package, however the script
|
|
147
|
+
will work without it.
|
|
148
|
+
|
|
149
|
+
The script has no direct dependency on `robotframework` itself, but obviously it
|
|
150
|
+
doesn't do much without it installed.
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
## Contributing
|
|
154
|
+
Contributions, bugs, and feature requests are welcome! Please see the
|
|
155
|
+
[Contributing Guide](CONTRIBUTING.md) for details on how to build the project
|
|
156
|
+
locally and submit changes.
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
## License
|
|
160
|
+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file
|
|
161
|
+
for details.
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "robotframework-trace"
|
|
3
|
+
version = "1.0.0"
|
|
4
|
+
description = "Alternative CLI for Robot Framework"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
authors = [{ name = "Jonathan Simmonds", email = "jon@jonsim.com" }]
|
|
7
|
+
keywords = ["robotframework", "listener", "cli", "trace"]
|
|
8
|
+
classifiers = [
|
|
9
|
+
"Development Status :: 4 - Beta",
|
|
10
|
+
"Programming Language :: Python"
|
|
11
|
+
]
|
|
12
|
+
license = "MIT"
|
|
13
|
+
license-files = ["LICENSE"]
|
|
14
|
+
dependencies = []
|
|
15
|
+
requires-python = ">=3.6"
|
|
16
|
+
|
|
17
|
+
[project.urls]
|
|
18
|
+
Homepage = "https://github.com/jonsim/robot-trace"
|
|
19
|
+
Repository = "https://github.com/jonsim/robot-trace.git"
|
|
20
|
+
Issues = "https://github.com/jonsim/robot-trace/issues"
|
|
21
|
+
|
|
22
|
+
[project.optional-dependencies]
|
|
23
|
+
dev = ["robotframework", "pre-commit", "coverage", "build", "twine"]
|
|
24
|
+
|
|
25
|
+
[build-system]
|
|
26
|
+
requires = ["setuptools>=64"]
|
|
27
|
+
build-backend = "setuptools.build_meta"
|
|
28
|
+
|
|
29
|
+
[tool.setuptools.packages.find]
|
|
30
|
+
where = ["."]
|
|
31
|
+
|
|
32
|
+
[project.scripts]
|
|
33
|
+
robot-trace = "robot_trace.runner:main"
|
|
34
|
+
|
|
35
|
+
[tool.ruff]
|
|
36
|
+
line-length = 88
|
|
37
|
+
|
|
38
|
+
[tool.ruff.lint]
|
|
39
|
+
select = ["E", "F", "I", "UP"]
|
|
40
|
+
|
|
41
|
+
[tool.ruff.format]
|
|
42
|
+
quote-style = "double"
|
|
43
|
+
indent-style = "space"
|
|
44
|
+
|
|
45
|
+
[tool.robocop.lint]
|
|
46
|
+
# In order to support older RobotFramework versions we deliberately use
|
|
47
|
+
# deprecated keywords (in this case, VAR).
|
|
48
|
+
ignore = ["VAR05", "DEPR05"]
|
|
49
|
+
|
|
50
|
+
[tool.robocop.lint.per_file_ignores]
|
|
51
|
+
"tests/minimal_testcases/*" = ["DOC01", "DOC02", "DOC03", "DOC04"]
|
|
52
|
+
"tests/minimal_testcases/invalid_syntax.robot" = ["MISC08"]
|
|
53
|
+
|
|
54
|
+
[tool.robocop.format]
|
|
55
|
+
select = ["AlignTemplatedTestCases"]
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Copyright (c) 2026 Jonathan Simmonds
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
class PrintVisits:
|
|
6
|
+
ROBOT_LISTENER_API_VERSION = 3
|
|
7
|
+
|
|
8
|
+
def __init__(self):
|
|
9
|
+
print("__init__")
|
|
10
|
+
|
|
11
|
+
def start_suite(self, suite, result):
|
|
12
|
+
print(f"start_suite({suite}, {result})")
|
|
13
|
+
|
|
14
|
+
def end_suite(self, suite, result):
|
|
15
|
+
print(f"end_suite({suite}, {result})")
|
|
16
|
+
|
|
17
|
+
def start_test(self, test, result):
|
|
18
|
+
print(f"start_test: {test}, {result}")
|
|
19
|
+
|
|
20
|
+
def end_test(self, test, result):
|
|
21
|
+
print(f"end_test: {test}, {result}")
|
|
22
|
+
|
|
23
|
+
def start_keyword(self, keyword, result):
|
|
24
|
+
print(f"start_keyword({keyword}, {result})")
|
|
25
|
+
|
|
26
|
+
def end_keyword(self, keyword, result):
|
|
27
|
+
print(f"end_keyword({keyword}, {result})")
|
|
28
|
+
|
|
29
|
+
def log_message(self, message):
|
|
30
|
+
print(f"log_message({message})")
|
|
31
|
+
|
|
32
|
+
def message(self, message):
|
|
33
|
+
# print(f"message({message})")
|
|
34
|
+
pass
|
|
35
|
+
|
|
36
|
+
def start_error(self, data, result):
|
|
37
|
+
print(f"start_error({data}, {result})")
|
|
38
|
+
|
|
39
|
+
def end_error(self, data, result):
|
|
40
|
+
print(f"end_error({data}, {result})")
|
|
41
|
+
|
|
42
|
+
def close(self):
|
|
43
|
+
print("close")
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Copyright (c) 2026 Jonathan Simmonds
|
|
2
|
+
#
|
|
3
|
+
import pprint
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
class PrintVisitsV2:
|
|
7
|
+
ROBOT_LISTENER_API_VERSION = 2
|
|
8
|
+
|
|
9
|
+
def __init__(self):
|
|
10
|
+
print("__init__")
|
|
11
|
+
|
|
12
|
+
def start_suite(self, suite, result):
|
|
13
|
+
print(f"start_suite({suite}, {result})")
|
|
14
|
+
|
|
15
|
+
def end_suite(self, suite, result):
|
|
16
|
+
print(f"end_suite({suite}, {result})")
|
|
17
|
+
|
|
18
|
+
def start_test(self, test, result):
|
|
19
|
+
print(f"start_test: {test}, {result}")
|
|
20
|
+
|
|
21
|
+
def end_test(self, test, result):
|
|
22
|
+
print(f"end_test: {test}, {result}")
|
|
23
|
+
|
|
24
|
+
def start_keyword(self, keyword, result):
|
|
25
|
+
print(f"start_keyword({keyword}, {pprint.pformat(result, indent=4)})")
|
|
26
|
+
|
|
27
|
+
def end_keyword(self, keyword, result):
|
|
28
|
+
print(f"end_keyword({keyword}, {pprint.pformat(result, indent=4)})")
|
|
29
|
+
|
|
30
|
+
def log_message(self, message):
|
|
31
|
+
print(f"log_message({message})")
|
|
32
|
+
|
|
33
|
+
def message(self, message):
|
|
34
|
+
# print(f"message({message})")
|
|
35
|
+
pass
|
|
36
|
+
|
|
37
|
+
def start_error(self, data, result):
|
|
38
|
+
print(f"start_error({data}, {result})")
|
|
39
|
+
|
|
40
|
+
def end_error(self, data, result):
|
|
41
|
+
print(f"end_error({data}, {result})")
|
|
42
|
+
|
|
43
|
+
def close(self):
|
|
44
|
+
print("close")
|