Script to free space from unnecessary AllureReport attachments.
Execute python script file with python and send it AllureReport path and status to filter attachments you want to remove.
python clean_allure_attachments.py allure-report passed
- From
allure-report/data/test-cases/
files collect all*.json
files with some "status". As example: "passed". - From each collected "passed" test-case jsonFile get all "attachments.source" from "beforeStage" "testStage" "afterStage" steps and sub-steps.
- Go to
allure-report/data/attachments/
and clean each "attachment.source" one by one. - Rewrite all necessary test-cases with empty
"attachments": [ ]
.