Allure TestOps stores test runs artefacts aka test results attachments in a storage on a dedicated AWS S3 compatible solution and in the database.
Artefacts consume considerable amount of space in the storage as well as in the database, so you need to delete those on a regular basis.
Generally, the clean up is described here: https://docs.qameta.io/allure-testops/briefly/project-settings/cleanup/
In Allure TestOps there are 3 types of artefacts (in order of decreasing storage consumption)
- attachments (consume most of the space), usually several per a test result, stored
- fixtures (consume less than attachments),
- scenario files (are supposed to be the smallest ones).
So, when creating the cleanup rules you need to delete all of artefacts described above.
Things to be considered
Allure TestOps' built-in cleanup routine deletes the artefacts only for the closed launches, i.e. even if your rule states that files are to be deleted in 24 hours and a launch is in the open state, none of the artefacts of such launch will be deleted.
There are separate rules for the deletion of the artefacts for test results with different status, e.g. for successful/failed tests.
For each result status you need to create 3 rules to delete each artefact type.
Hint: for successful tests (passed) it makes sense to keep 1-2 copies of the artefacts defined by the frequency of your tests runs, i.e. if your test runs 1 time per 24 hours, then it is reasonable to delete all the artifacts after, say 36 hours considering the information on the scheduler working (see the link above).
Rules to keep the artefacts for the other statuses depends on your team: you need to understand how much time is usually needed for the failures analysis and add some guard interval.
Say, if you need 5 working days for the analysis, then delete the artefacts for failed tests after 168 hours (7 full days).
Example
This is not a recommendation but an example, what is the full list of cleanup rules is to be created for the artefacts clean-up.
The delay for the deletion should be defined by your internal processes.
There are several test results in your test result
The test result and the result of a SetUp block and result of TearDown block are separate entities, i.e. there is result of SetUp, Result of Test and Result of TearDown accordingly to the Allure Framework, and the cleanup of fixtures and the information from the scenario of a test are separate processes.
Say you have a directive to clean the attachments for the Passed results in 1 hour, and delete the attachments for the Failed results in 10 hours
and you have the following result
Then the attachments will be deleted as follows