Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aleksandr-kotlyar/allure-report-attachments-cleaner
Script to free space from unnecessary allure attachments.
https://github.com/aleksandr-kotlyar/allure-report-attachments-cleaner
Last synced: 26 days ago
JSON representation
Script to free space from unnecessary allure attachments.
- Host: GitHub
- URL: https://github.com/aleksandr-kotlyar/allure-report-attachments-cleaner
- Owner: aleksandr-kotlyar
- License: mit
- Created: 2021-03-15T20:27:56.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-07-17T00:49:02.000Z (over 3 years ago)
- Last Synced: 2023-07-13T19:47:15.799Z (over 1 year ago)
- Language: Python
- Homepage:
- Size: 120 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# allure-report-attachments-cleaner
![views](https://raw.githubusercontent.com/aleksandr-kotlyar/allure-report-attachments-cleaner/traffic-2021/traffic-allure-report-attachments-cleaner/views.svg)
![views](https://raw.githubusercontent.com/aleksandr-kotlyar/allure-report-attachments-cleaner/traffic-2021/traffic-allure-report-attachments-cleaner/views_per_week.svg)
![clones](https://raw.githubusercontent.com/aleksandr-kotlyar/allure-report-attachments-cleaner/traffic-2021/traffic-allure-report-attachments-cleaner/clones.svg)
![clones](https://raw.githubusercontent.com/aleksandr-kotlyar/allure-report-attachments-cleaner/traffic-2021/traffic-allure-report-attachments-cleaner/clones_per_week.svg)Script to free space from unnecessary AllureReport attachments.
### Usage example
Execute python script file with python and send it AllureReport path and status to filter attachments you want to remove.
```python
python clean_allure_attachments.py allure-report passed
```### Algorithm
1. From `allure-report/data/test-cases/` files collect all `*.json` files with some "status". As example: "passed".
2. From each collected "passed" test-case jsonFile get all "attachments.source" from "beforeStage" "testStage" "afterStage" steps and sub-steps.
3. Go to `allure-report/data/attachments/` and clean each "attachment.source" one by one.
4. Rewrite all necessary test-cases with empty `"attachments": [ ]`.