Table Reporter
ReportTable
¶
ReportTable()
Create a rich.Table instance based on an anta.result_manager.ResultManager instance.
Attributes:
| Name | Type | Description |
|---|---|---|
title |
Title used when creating the |
|
columns |
Column names used when creating the |
Columns
dataclass
¶
Columns(
device: str = "Device",
test: str = "Test",
category: str = "Category",
status: str = "Status",
messages: str = "Message(s)",
description: str = "Description",
number_of_success: str = "# of success",
number_of_failure: str = "# of failure",
number_of_skipped: str = "# of skipped",
number_of_errors: str = "# of errors",
failed_devices: str = "List of devices with failed or errored tests",
failed_tests: str = "List of failed or errored tests",
)
Column names for the table report.
Title
dataclass
¶
Title(
all: str = "All tests results",
tests: str = "Summary per test",
device: str = "Summary per device",
)
Titles for the table report.
generate
¶
generate(manager: ResultManager) -> Table
Create a table report with all tests.
Attributes used to build the table are:
Table title: `title.all`
Table columns:
- `columns.category`
- `columns.device`
- `columns.test`
- `columns.description`
- `columns.status`
- `columns.messages`
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manager
|
ResultManager
|
A ResultManager instance. |
required |
Returns:
| Type | Description |
|---|---|
A fully populated rich `Table`.
|
|
Source code in anta/reporter/__init__.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 | |
generate_expanded
¶
generate_expanded(manager: ResultManager) -> Table
Create a table report with all tests, expanded atomic results, test descriptions.
Attributes used to build the table are:
Table title: `title.all`
Table columns:
- `columns.category`
- `columns.device`
- `columns.test`
- `columns.description`
- `columns.status`
- `columns.messages`
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manager
|
ResultManager
|
A ResultManager instance. |
required |
Returns:
| Type | Description |
|---|---|
Table
|
A fully populated rich |
Source code in anta/reporter/__init__.py
165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 | |
generate_summary_by_device
¶
generate_summary_by_device(
manager: ResultManager,
*,
devices: set[str] | None = None
) -> Table
Create a table report with results aggregated per device.
Attributes used to build the table are:
Table title: `title.device`
Table columns:
- `columns.device`
- `columns.number_of_success`
- `columns.number_of_skipped`
- `columns.number_of_failure`
- `columns.number_of_errors`
- `columns.failed_tests`
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manager
|
ResultManager
|
A ResultManager instance. |
required |
devices
|
set[str] | None
|
List of device names to include. None to select all devices. |
None
|
Returns:
| Type | Description |
|---|---|
A fully populated rich `Table`.
|
|
Source code in anta/reporter/__init__.py
272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 | |
generate_summary_by_test
¶
generate_summary_by_test(
manager: ResultManager, *, tests: set[str] | None = None
) -> Table
Create a table report with results aggregated per test.
Attributes used to build the table are:
Table title: `title.tests`
Table columns:
- `columns.test`
- `columns.number_of_success`
- `columns.number_of_skipped`
- `columns.number_of_failure`
- `columns.number_of_errors`
- `columns.failed_devices`
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manager
|
ResultManager
|
A ResultManager instance. |
required |
tests
|
set[str] | None
|
List of test names to include. None to select all tests. |
None
|
Returns:
| Type | Description |
|---|---|
A fully populated rich `Table`.
|
|
Source code in anta/reporter/__init__.py
225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 | |
report_all
deprecated
¶
report_all(
manager: ResultManager, title: str = "All tests results"
) -> Table
Deprecated
This method is deprecated, use generate instead. This will be removed in ANTA v2.0.0.
Create a table report with all tests for one or all devices.
Create table with full output: Device | Test Name | Test Status | Message(s) | Test description | Test category
Warnings
- This method sets the
report.title.allvalue which impacts future calls to generate_* methods.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manager
|
ResultManager
|
A ResultManager instance. |
required |
title
|
str
|
Title for the report. Defaults to ‘All tests results’. |
'All tests results'
|
Returns:
| Type | Description |
|---|---|
Table
|
A fully populated rich |
Source code in anta/reporter/__init__.py
323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 | |
report_summary_devices
deprecated
¶
report_summary_devices(
manager: ResultManager,
devices: list[str] | None = None,
title: str = "Summary per device",
) -> Table
Deprecated
This method is deprecated, use generate_summary_devices instead. This will be removed in ANTA v2.0.0.
Create a table report with result aggregated per device.
Create table with full output: Device | # of success | # of skipped | # of failure | # of errors | List of failed or error test cases
Warnings
- This method sets the
report.title.allvalue which impacts future calls to generate_* methods.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manager
|
ResultManager
|
A ResultManager instance. |
required |
devices
|
list[str] | None
|
List of device names to include. None to select all devices. |
None
|
title
|
str
|
Title of the report. |
'Summary per device'
|
Returns:
| Type | Description |
|---|---|
Table
|
A fully populated rich |
Source code in anta/reporter/__init__.py
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 | |
report_summary_tests
deprecated
¶
report_summary_tests(
manager: ResultManager,
tests: list[str] | None = None,
title: str = "Summary per test",
) -> Table
Deprecated
This method is deprecated, use generate_summary_tests instead. This will be removed in ANTA v2.0.0.
Create a table report with result aggregated per test.
Create table with full output: Test Name | # of success | # of skipped | # of failure | # of errors | List of failed or error nodes
Warnings
- This method sets the
report.title.allvalue which impacts future calls to generate_* methods.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manager
|
ResultManager
|
A ResultManager instance. |
required |
tests
|
list[str] | None
|
List of test names to include. None to select all tests. |
None
|
title
|
str
|
Title of the report. |
'Summary per test'
|
Returns:
| Type | Description |
|---|---|
Table
|
A fully populated rich |
Source code in anta/reporter/__init__.py
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 | |