Store files on Tricentis File Service

Tricentis File Service is a web-based application which allows you to store the files you attach in Tosca Commander outside of the local workspace. This keeps your workspace slim, which improves its performance.

You can store the following file types:

Install and configure Tricentis File Service

The installation and configuration of Tricentis File Service is part of the Tosca Server installation.

For detailed information on how to configure Tricentis File Service, see chapter "Configure services via Tricentis Service Configuration".

Enable Tricentis File Service

Once you have installed and configured Tricentis File Service, you can enable it for your projects in the Tosca Administration Console.

If you enable Tricentis File Service for a particular project, you can't disable it.

The following settings are not available when Tricentis File Service is enabled:

To enable Tricentis File Service, follow the steps below:

  1. Open the Tosca Administration Console.

  2. Scroll to the project you want to enable Tricentis File Service for.

  3. In the File Service column of the project, select Enable.

Enable Tricentis File Service

When you enable Tricentis File Service, it requests the list of the projects you are assigned to from Tricentis Project Service. This data is cached in Tricentis File Service for 3 minutes.

If the list of projects is updated in Tricentis Project Service during runtime, the new data is acquired within 3 minutes.

To prevent any impact on the performance of Tricentis File Service, add the file Tricentis.FileService.WebApi.exe to the exclusion list of your virus scanner. The file is located at C:\Program Files (x86)\TRICENTIS\Tosca Server\FileService.

If your virus scanner does not offer this option, exclude the file storage path.

Specify Tricentis Services settings

To use Tricentis File Service, you have to specify the server endpoint address.

To do so, go to Project->Settings->Tricentis Services and specify the endpoint as described in chapter "Settings - Tricentis Services".

Work with attached files

To attach files to an object in Tosca Commander, drag and drop the file from Microsoft Windows Explorer onto the respective object.

Alternatively, right-click on a file and select Attach file from the context menu.

Tosca Commander automatically saves the file to the Tricentis File Service.

If you use Tricentis File Service, it is not possible to link, link-manage, or embed files.

Save file copies

You can save copies of attached files.

To do so, right-click on an attachment and select Save Copy to from the context menu.

Edit files

If you edit an attached file in a multi-user workspace, you have to check in your changes to update the file in the Tricentis File Service.

Migrate files

If you have enabled the Tricentis File Service, newly attached files or newly created logs are automatically stored on the file service. This includes attachments (Embedded, Linked, Linked managed files) and ExecutionLogs of included objects. This option is also available for lost objects. To migrate files, you need admin access rights.

Ensure to create a backup of your database before you migrate the files and logs.

Tricentis recommends that you implement and test the file and log migration on a test database first. If the migration on your test database was successful, continue migrating your productive database.

To upload already existing files and logs from your repository to the Tricentis File Service, follow the steps below:

  1. Select the folder that contains the elements you want to migrate.

  2. Right-click on the folder and select Migrate to FileService from the context menu.

  3. Check in the files to upload them to the Tricentis File Service.

Ensure to include all objects that contain files and logs you want to migrate to the Tricentis File Service. To do so, follow the steps below:

  1. Ensure to include all objects (see chapter "Enable Synchronization").

  2. If you have multi-user workspaces in your old project, check in all objects you want to migrate.

  3. Find all checked out objects with the following TQL search query on the project root element:

    ->AllOwnedSubItems[CheckOutState == "CheckedOut"]

  4. Right-click the search elements and select Revoke Checkout from the context menu.

  5. Right-click either on the whole project root element or the component folder(s) and select Migrate to FileService from the context menu.

    Depending on the size of your objects, the migration of the whole project root element can take longer.

Empty local cache

If you access files or results that are stored on the Tricentis File Service within Tosca Commander, they are cached on the local machine. You can remove these locally cached files and results to free disk space on your local machine.

To do so, navigate to Project->Info and select Empty local File Service Cache.

If you want to access any files that you have stored on the Tricentis File Service again, you have to download them again.

Back up and restore Tricentis File Service

You can create a copy of data stored on Tricentis File Service that you can recover it in case of data failure, for instance. You can back up data you have stored on Tricentis File Service and restore the data.

Back up Tricentis File Service data

To back up data you have stored on Tricentis File Service, follow the steps below:

  1. Back up the database fileService.db, which contains the metadata. The default location of the database is C:\ProgramData\TRICENTIS\FileService\fileService.db. Store the database backup on a safe location on your machine, for instance.

  2. Back up your actual files. The data is located in the storage directory path that you have specified during the configuration of Tricentis File Service. Store the backup of your files on a safe location on your machine, for instance.

    This process is the same if you have enabled Tricentis File Service for multiple Common Repositories. You only need to do one backup.

Restore Tricentis File Service data

To restore your data from a Tricentis File Service backup, follow the steps below:

  1. Move the backup of the database fileService.db to the default location at C:\ProgramData\TRICENTIS\FileService\fileService.db.

  2. Move the backup of your actual files to the storage directory path that you have specified during configuration of Tricentis File Service.

If you want to restore Tricentis File Service after installing Tricentis Tosca on a new machine, install and configure Tricentis File Service first. After the installation, restore the data in the following order:

  1. Metadata and actual data of the Tricentis File Service

  2. Data of the Common Database Repository

Manage Tricentis File Service size

To manage File Service size, you have to be an Admin user.

ExecutionLogs stored on Tricentis File Service can take up significant space. As an Admin user, you can delete ExecutionLogs that are older than a specified number of days to free up space on Tricentis File Service.

If you want to keep ExecutionLogs, but still reduce the size of Tricentis File Service, you can delete only the screenshots attached to specific ExecutionLogs.

You can manage Tricentis File Service size via TC-Shell.

You cannot restore deleted ExecutionLogs or screenshots. The ExecutionLogs you delete will not be available for any users.

Delete ExecutionLogs via TC-Shell in interactive mode

To delete ExecutionLogs via TC-Shell in interactive mode, follow the steps below:

  1. Open your workspace in TC-Shell.

  2. Navigate to the project node.

  3. Run TC-Shell command deleteOldExecutionLogs.

  4. In the subsequent dialog, specify a number of days to define which ExecutionLogs to delete. Tosca deletes all ExecutionLogs older than the specified number of days. For example, if you specify 100, Tosca deletes all ExecutionLogs created more than 100 days ago.

    To delete all ExecutionLogs stored on Tricentis File Service, specify -1.

  5. In the subsequent dialog, select whether you want to delete complete ExecutionLogs or only the screenshots attached to them:

    • Select False to delete complete ExecutionLogs, including attached screenshots.

    • Select True to only delete screenshots attached to the ExecutionLogs.

Until you empty your local cache, you can still view deleted ExecutionLogs and screenshots.

Delete ExecutionLogs via TC-Shell in script mode

To delete ExecutionLogs via TC-Shell in script mode, run the command deleteOldExecutionLogs followed by a space and the number of days that define how old the ExecutionLogs should be to be deleted. After that add False to delete the complete ExecutionLogs including attached screenshots, or True to only delete the screenshots attached to the ExecutionLogs.

Examples:

  • Command deleteOldExecutionLogs 100 False deletes all ExecutionLogs created more than 100 days ago.

  • Command deleteOldExecutionLogs 150 True deletes only screenshots attached to ExecutionLogs that were created more than 150 days ago.

  • Command deleteOldExecutionLogs -1 False deletes all ExecutionLogs stored on Tricentis File Service.

Until you empty your local cache, you can still view deleted ExecutionLogs and screenshots.

Delete objects with references to Tricentis File Service files

Many Tosca objects refer to objects in Tricentis File Service. If you delete an object in Tosca that has reference to a file in Tricentis File Service, the file in Tricentis File Service can become an orphan file. Orphan files are unused files that are still stored on Tricentis File Service.

To prevent orphan files in Tricentis File Service, Tosca deletes them when you delete the only object that refers to them. The deletion is permanent, which means that it cannot be reverted, and the files cannot be restored. When you delete a Tosca object that has referenced files in Tricentis File Service, Tosca warns you about the deletion of the referenced files.

Screenshots from Tricentis File Service can only be deleted via TC-Shell.

Tricentis recommends to use the deleteOldExecutionLogs TC-Shell command for log and screenshot deletions.

Delete objects with references to Tricentis File Service files via TC-Shell

You can delete Tosca objects via TC-Shell by running the delete task on the object that you want to delete. If the object has referenced files in Tricentis File Service, you receive a notification.

If you receive a notification about referenced files in Tricentis File Service, enter OK to confirm the deletion of the those files.

Delete objects with references to Tricentis File Service files via TC API

If you delete a Tosca object via TC API, Tosca deletes the referenced files from Tricentis File Service by default, without displaying a warning message. You can change this behavior by additional parameters. For more information, access the TC API documentation.