allure-cli 0.3.0__tar.gz → 0.4.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.
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: allure-cli
3
- Version: 0.3.0
4
- Summary: CLI for Allure TestOps: search, create and delete test cases
3
+ Version: 0.4.0
4
+ Summary: CLI for Allure TestOps: search, create and delete test cases, inspect launch failures
5
5
  Author: Allure CLI Contributors
6
6
  License-Expression: MIT
7
7
  Project-URL: Homepage, https://github.com/teka1905/allure_cli
@@ -24,7 +24,7 @@ Dynamic: license-file
24
24
 
25
25
  # Allure CLI
26
26
 
27
- A CLI for Allure TestOps. Its main job is looking up a test case's Allure ID by name; it can also create, delete and audit test cases.
27
+ A CLI for Allure TestOps. Its main job is looking up a test case's Allure ID by name; it can also create, delete and audit test cases, and show why a launch failed — messages, traces and attachments.
28
28
 
29
29
  [![PyPI version](https://badge.fury.io/py/allure-cli.svg)](https://pypi.org/project/allure-cli/)
30
30
  [![Python](https://img.shields.io/pypi/pyversions/allure-cli.svg)](https://pypi.org/project/allure-cli/)
@@ -64,12 +64,15 @@ export ALLURE_TOKEN="<YOUR_TOKEN>"
64
64
 
65
65
  ## Usage
66
66
 
67
- The CLI has four commands:
67
+ The CLI has seven commands:
68
68
 
69
69
  1. **`search`** (the default) — find test cases by ID or name
70
70
  2. **`find-orphaned`** — find orphaned (stale) tests
71
71
  3. **`delete`** — delete test cases by ID
72
72
  4. **`create`** — create test cases, one by one or in bulk from a file
73
+ 5. **`launches`** — list launches, optionally filtered by name
74
+ 6. **`failures`** — failed and broken tests of a launch: message, trace, attachments
75
+ 7. **`attachments`** — list or download the attachments of a test result
73
76
 
74
77
  **Help:**
75
78
 
@@ -83,6 +86,7 @@ allure-cli search --help
83
86
  allure-cli find-orphaned --help
84
87
  allure-cli delete --help
85
88
  allure-cli create --help
89
+ allure-cli failures --help
86
90
  ```
87
91
 
88
92
  ### `search` — find tests
@@ -443,6 +447,92 @@ About to create 1 test case(s):
443
447
  Done. Created: 1, Failed: 0
444
448
  ```
445
449
 
450
+ ### `launches` — list launches
451
+
452
+ ```bash
453
+ # The 10 most recent launches of the project
454
+ allure-cli launches
455
+
456
+ # Launches whose name contains a substring (newest first)
457
+ allure-cli launches "pr_15967418"
458
+
459
+ # IDs only / JSON for scripts
460
+ allure-cli launches "nightly" -q
461
+ allure-cli launches "nightly" --json
462
+ ```
463
+
464
+ | Option | Description | Default |
465
+ |--------|-------------|---------|
466
+ | `--size` | Maximum number of launches | 10 |
467
+ | `-q, --quiet` | Print IDs only, one per line | false |
468
+ | `--json` | Print launches as JSON | false |
469
+ | `--no-color` | Disable colored output | false |
470
+
471
+ **Example output:**
472
+
473
+ ```
474
+ ID 748636 2026-09-23 18:11 open user-pr_15967418-37790018 --seed d8002021
475
+ ```
476
+
477
+ ### `failures` — why a launch is red
478
+
479
+ Shows every `failed` and `broken` test result of a launch with its error message.
480
+ The launch is given by ID or by a substring of its name; the newest matching launch is used.
481
+ A number is tried as a launch ID first and then as a name, so a PR or build number found
482
+ in launch names works as is.
483
+
484
+ ```bash
485
+ # By launch ID
486
+ allure-cli failures 748636
487
+
488
+ # By a part of the launch name (e.g. a PR number)
489
+ allure-cli failures 15967418
490
+
491
+ # Full traces instead of messages
492
+ allure-cli failures 748636 --trace
493
+
494
+ # Also save the attachments (screenshots, logs) to ./allure/<test result id>/
495
+ allure-cli failures 748636 --download ./allure
496
+
497
+ # Everything, traces included, as JSON — handy for scripts and AI agents
498
+ allure-cli failures 748636 --json
499
+ ```
500
+
501
+ | Option | Description | Default |
502
+ |--------|-------------|---------|
503
+ | `--trace` | Print the full trace of every failure | false |
504
+ | `--download DIR` | Save attachments of every failure to `DIR/<test result id>/` | — |
505
+ | `--json` | Print launch, status counts and failures (with traces) as JSON | false |
506
+ | `--no-color` | Disable colored output | false |
507
+
508
+ **Example output:**
509
+
510
+ ```
511
+ Launch 748636 · 2026-09-23 18:11 · open
512
+ user-pr_15967418-37790018 --seed d8002021
513
+ failed 2 · passed 344
514
+
515
+ 1. [failed] Link a knowledge article to a ticket
516
+ └─ scenarios/admin/ticket_page/link_knowledge.py::Scenario
517
+ result 1399454750 · 40.7s
518
+ AssertionError: the knowledge base widget did not show the service
519
+ attachments: 12 → allure/1399454750
520
+ ```
521
+
522
+ ### `attachments` — files of a test result
523
+
524
+ ```bash
525
+ # List the attachments of a test result (the ID comes from `failures`)
526
+ allure-cli attachments 1399454750
527
+
528
+ # Download them
529
+ allure-cli attachments 1399454750 --download ./allure/1399454750
530
+ ```
531
+
532
+ Attachment files keep their names from Allure; when a name repeats within a test result,
533
+ the attachment ID is appended (`shot.png`, `shot_1723967328.png`). Downloading again
534
+ overwrites the same files. `--project` is not needed for this command.
535
+
446
536
  ## Authorization
447
537
 
448
538
  The scheme comes from the [TestOps documentation](https://docs.qatools.ru/api): the API token is exchanged for a JWT via `POST /api/uaa/oauth/token`, and API requests then carry an `Authorization: Bearer <jwt>` header.
@@ -1,6 +1,6 @@
1
1
  # Allure CLI
2
2
 
3
- A CLI for Allure TestOps. Its main job is looking up a test case's Allure ID by name; it can also create, delete and audit test cases.
3
+ A CLI for Allure TestOps. Its main job is looking up a test case's Allure ID by name; it can also create, delete and audit test cases, and show why a launch failed — messages, traces and attachments.
4
4
 
5
5
  [![PyPI version](https://badge.fury.io/py/allure-cli.svg)](https://pypi.org/project/allure-cli/)
6
6
  [![Python](https://img.shields.io/pypi/pyversions/allure-cli.svg)](https://pypi.org/project/allure-cli/)
@@ -40,12 +40,15 @@ export ALLURE_TOKEN="<YOUR_TOKEN>"
40
40
 
41
41
  ## Usage
42
42
 
43
- The CLI has four commands:
43
+ The CLI has seven commands:
44
44
 
45
45
  1. **`search`** (the default) — find test cases by ID or name
46
46
  2. **`find-orphaned`** — find orphaned (stale) tests
47
47
  3. **`delete`** — delete test cases by ID
48
48
  4. **`create`** — create test cases, one by one or in bulk from a file
49
+ 5. **`launches`** — list launches, optionally filtered by name
50
+ 6. **`failures`** — failed and broken tests of a launch: message, trace, attachments
51
+ 7. **`attachments`** — list or download the attachments of a test result
49
52
 
50
53
  **Help:**
51
54
 
@@ -59,6 +62,7 @@ allure-cli search --help
59
62
  allure-cli find-orphaned --help
60
63
  allure-cli delete --help
61
64
  allure-cli create --help
65
+ allure-cli failures --help
62
66
  ```
63
67
 
64
68
  ### `search` — find tests
@@ -419,6 +423,92 @@ About to create 1 test case(s):
419
423
  Done. Created: 1, Failed: 0
420
424
  ```
421
425
 
426
+ ### `launches` — list launches
427
+
428
+ ```bash
429
+ # The 10 most recent launches of the project
430
+ allure-cli launches
431
+
432
+ # Launches whose name contains a substring (newest first)
433
+ allure-cli launches "pr_15967418"
434
+
435
+ # IDs only / JSON for scripts
436
+ allure-cli launches "nightly" -q
437
+ allure-cli launches "nightly" --json
438
+ ```
439
+
440
+ | Option | Description | Default |
441
+ |--------|-------------|---------|
442
+ | `--size` | Maximum number of launches | 10 |
443
+ | `-q, --quiet` | Print IDs only, one per line | false |
444
+ | `--json` | Print launches as JSON | false |
445
+ | `--no-color` | Disable colored output | false |
446
+
447
+ **Example output:**
448
+
449
+ ```
450
+ ID 748636 2026-09-23 18:11 open user-pr_15967418-37790018 --seed d8002021
451
+ ```
452
+
453
+ ### `failures` — why a launch is red
454
+
455
+ Shows every `failed` and `broken` test result of a launch with its error message.
456
+ The launch is given by ID or by a substring of its name; the newest matching launch is used.
457
+ A number is tried as a launch ID first and then as a name, so a PR or build number found
458
+ in launch names works as is.
459
+
460
+ ```bash
461
+ # By launch ID
462
+ allure-cli failures 748636
463
+
464
+ # By a part of the launch name (e.g. a PR number)
465
+ allure-cli failures 15967418
466
+
467
+ # Full traces instead of messages
468
+ allure-cli failures 748636 --trace
469
+
470
+ # Also save the attachments (screenshots, logs) to ./allure/<test result id>/
471
+ allure-cli failures 748636 --download ./allure
472
+
473
+ # Everything, traces included, as JSON — handy for scripts and AI agents
474
+ allure-cli failures 748636 --json
475
+ ```
476
+
477
+ | Option | Description | Default |
478
+ |--------|-------------|---------|
479
+ | `--trace` | Print the full trace of every failure | false |
480
+ | `--download DIR` | Save attachments of every failure to `DIR/<test result id>/` | — |
481
+ | `--json` | Print launch, status counts and failures (with traces) as JSON | false |
482
+ | `--no-color` | Disable colored output | false |
483
+
484
+ **Example output:**
485
+
486
+ ```
487
+ Launch 748636 · 2026-09-23 18:11 · open
488
+ user-pr_15967418-37790018 --seed d8002021
489
+ failed 2 · passed 344
490
+
491
+ 1. [failed] Link a knowledge article to a ticket
492
+ └─ scenarios/admin/ticket_page/link_knowledge.py::Scenario
493
+ result 1399454750 · 40.7s
494
+ AssertionError: the knowledge base widget did not show the service
495
+ attachments: 12 → allure/1399454750
496
+ ```
497
+
498
+ ### `attachments` — files of a test result
499
+
500
+ ```bash
501
+ # List the attachments of a test result (the ID comes from `failures`)
502
+ allure-cli attachments 1399454750
503
+
504
+ # Download them
505
+ allure-cli attachments 1399454750 --download ./allure/1399454750
506
+ ```
507
+
508
+ Attachment files keep their names from Allure; when a name repeats within a test result,
509
+ the attachment ID is appended (`shot.png`, `shot_1723967328.png`). Downloading again
510
+ overwrites the same files. `--project` is not needed for this command.
511
+
422
512
  ## Authorization
423
513
 
424
514
  The scheme comes from the [TestOps documentation](https://docs.qatools.ru/api): the API token is exchanged for a JWT via `POST /api/uaa/oauth/token`, and API requests then carry an `Authorization: Bearer <jwt>` header.
@@ -3,5 +3,5 @@
3
3
  from .client import find_by_name, get_jwt, search_test_cases
4
4
  from .cli import main
5
5
 
6
- __version__ = "0.2.4"
6
+ __version__ = "0.4.0"
7
7
  __all__ = ["find_by_name", "get_jwt", "search_test_cases", "main"]