Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Cleaning up reports storage directory for the SOAtest/Virtualize Server

mniesciur
mniesciur Posts: 6

Starting with version 9.10.4, the SOAtest/Virtualize server can perform test execution jobs. Reports from these jobs are saved in the reports storage directory.
The location of the reports storage directory is different on every operating system and depends on the value of the "java.io.tmpdir" property.
It is highly recommended to remove old reports to not exceed disc quota.
Unfortunately, the server doesn't clean up reports storage automatically.
To achieve this you need to run some scripts on the server machine that will do it.
Here are examples of cleaning scripts for Linux and Windows.

Linux bash script:
#!/bin/sh
# set reports storage location
REPORTS_LOCATION=/tmp/parasoft/soavirt/reports
# remove reports modified more than 3 days ago
find $REPORTS_LOCATION -type d -name "rep_*" -mtime +3 -exec rm -r {} \;

Windows batch script:
:: set reports storage location
set REPORTS_LOCATION=%appdata%\Local\Temp\parasoft\reports
:: remove reports modified more than 3 days ago
forfiles -p %REPORTS_LOCATION% -m rep_* /D -3 /C "cmd /c IF @isdir == TRUE rd /s /q @path"