Enable pre-execution approval

Tosca's pre-execution approval is an automated process to request and grant approval for TestCases. It's a vital tool to safeguard your test environment, and it speeds up your governance processes.

This topic is for administrators. It tells you everything you need to know about enabling pre-execution approval for users.

Before you start

Make sure your environment is ready for pre-execution approval. If you have a workspace with existing TestCases that are still in progress, pay special attention to these additional considerations.

Modify the Tosca configuration

To toggle the feature flag in Tosca, you need to modify a Tosca configuration file. You have to do this on all machines where users send approval requests or approve requests in Tosca.

To remove the feature flag from Tosca, follow these steps:

  1. Open the TOSCACommander.exe.config file on a user's machine. After a default installation, this file is located at %COMMANDER_HOME%.

  2. In the configsSection section, add the following code between the sectionGroup name="applicationSettings" tags:

<section name="Tricentis.TCAddIns.ExecutionApprovalAddIn.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  1. Scroll down and add the following code between the applicationSettings tags:

<Tricentis.TCAddIns.ExecutionApprovalAddIn.Properties.Settings>
    <setting name="ExecutionApprovalEnabled" serializeAs="String">
        <value>True</value>
    </setting>
</Tricentis.TCAddIns.ExecutionApprovalAddIn.Properties.Settings>
  1. Save and close the file.

  2. Repeat this process on all machines where users either send approval requests or approve requests in Tosca.

Modify the Tosca Server configuration

To toggle the feature flag in Tosca Server, you need to modify the REST API configuration file on the Tosca Server machine. This step is only necessary in the following circumstances:

  • You use the integrated version of pre-execution approval with qTest and VERA.

  • You want to send approval requests or approve requests via REST API.

If your testers and approvers work exclusively in Tosca Commander, you can skip this step and finalize the enablement instead.

To remove the feature flag from Tosca Server, follow these steps:

  1. Open the TCAPIRestServiceStandalone.exe.config file on the Tosca Server machine. After a default installation, this file is located at C:\Program Files (x86)\Tricentis\Tosca Server\RestApiService.

  2. In the configsSection section, add the following code between the sectionGroup name="applicationSettings" tags:

<section name="Tricentis.TCAddIns.ExecutionApprovalAddIn.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  1. Scroll down and add the following code between the applicationSettings tags:

<Tricentis.TCAddIns.ExecutionApprovalAddIn.Properties.Settings>
    <setting name="ExecutionApprovalEnabled" serializeAs="String">
        <value>True</value>
    </setting>
</Tricentis.TCAddIns.ExecutionApprovalAddIn.Properties.Settings>
  1. Save and close the file.

Finalize the enablement

As a last step, finalize the enablement in Tosca. You only need to do this once, in a workspace that's connected to the common repository.

To finalize the enablement, follow these steps:

  1. Make sure you're a Tosca Commander admin user. Only admin users can perform these tasks.

  2. Open the workspace in Tosca.

  3. Check out the project root element.

  4. If you use the integrated version of pre-execution approval, modify the settings:

    • If you don't have project settings yet, create a project settings root element and import the Project.Settings.xml as described here.

    • Go to Project->Settings->Commander->General->Advanced.

    • Create a new setting with the name SendTestCaseWorkStateToQTest and the value True. Make sure to save the new setting to the Project.Settings.xml in the workspace.

    • Go to Settings->TBox->DokuSnapper.

    • Set Enable Snapper to Yes. Then right-click the setting and select Override from the context menu. In the next screen, save the setting to the Project.Settings.xml in the workspace.

    • Set Storage Location Type to Tosca. Then right-click the setting and select Override from the context menu. In the next screen, save the setting to the Project.Settings.xml in the workspace.

    • Close the settings dialog.

  5. Create a user group and users for your approvers. Keep the following things in mind: 

    • Each approver must have a separate user account and must be part of this user group.

    • If you want to send different TestCases to different approvers, create separate user groups for each set of approvers.

    • You don't need to manually assign these user groups to TestCases. When users request approval for a TestCase, they define which user group receives the request.

  6. Activate pre-execution approval. To do so, right-click the project root element and select Enable execution approval from the context menu.

  7. Check in all.

Manage approvers

Your approvers might change over time. If you need to add or remove approvers, add or remove users from the approvers user group.

Disable pre-execution approval

If you enable pre-execution approval, but then you realize that you need to do some clean-up tasks first, you can disable the feature temporarily. To do so, right-click the project root element and select Disable execution approval from the context menu.

If you want to disable pre-execution approval permanently, follow these steps:

  1. Right-click the project root element and select Disable execution approval from the context menu.

  2. Remove the code you added to the Tosca and the Tosca Server configuration files.

What's next

Everything's ready. Users can now request approval for their TestCases and reviewers can approve these TestCases.