Allure TestOps - Storage management

Storage

Each test launch generates a considerable amount of data which includes test scenarios and attachments. You may need this information if the test run is not successful.

But this data takes a lot of storage space. After you have analyzed the data, you can delete the data manually which could be difficult if you have thousands of tests running every day.

Allure TestOps allows you to configure automatic cleanup of such data.

Create a global cleanup rule

To create a cleanup rule, you need administrator privileges.
  1. In the Allure TestOps main page, go to the User Menu and select Administration in the drop-down menu.

  2. Go to the Storage section. Here you can find up-to-date information about the storage.

  3. Click the Create button. Select the Target and Test status of the target test from the drop-down lists.

  4. Specify the Clean delay (in hours) parameter. It defines number of hours between a test run and the data cleanup.

    Global cleanup rules

  5. Click Submit. You can also Edit or Delete created rules.

Think about the cleanup rules that suit you best. If you don’t need to analyze the data from the successful test cases, you can configure immediate data cleanup for them. If you need a few days to analyze the data every time something goes wrong, you can set that failed test attachments will be deleted after 50 hours.

Create a cleanup rule for a specific project

Global cleanup rules configured by the administrator may not be appropriate for your project. In this case, you can configure a rule for the current project.

To create a cleanup rule for the project, you must be the project Owner.
  1. Open the required project and go to the Settings section.

  2. Go to the Storage section. Here you can see the global cleanup rules for your system.

  3. Click the Create button and specify Target, Test status and Clean delay (in hours) in the same way as above.

    Project cleanup rules

  4. Click Submit. You can also Edit or Delete created rules.

Set up a schedule

By default, Allure TestOps performs cleanup tasks at night. To change the schedule, you need specify required values for the following environment variables:

  • ALLURE_SCHEDULER_CLEANER_GLOBAL

    Parameter for global cleanup rules. Default value is "0 0 2 * * ?" — cleanup tasks will be performed every day at 2 am.

  • ALLURE_SCHEDULER_CLEANER_PROJECT

    Parameter for project cleanup rules. Default value is "0 30 2 * * ?" — cleanup tasks will be performed every day at 2:30 am.

  • ALLURE_SCHEDULER_CLEANER_STORAGE

    Parameter for deleting orphaned files from BlobStorage. Default value is "0 0 3 * * ?" — cleanup tasks will be performed every day at 3:00 am.

For huge projects, cleaning may take a long time. In order to track execution time for cleanup tasks, Allure TestOps exports the following metrics: allure.scheduler.cleaner_schema and allure.scheduler.global_cleaner_schema.