# Tosca Server

This guide explains how to integrate **Tosca Server** with **ReleaseOwl** to run automated functional and web tests as part of your release pipelines. It describes the end-to-end steps required to register Tosca credentials, create Test Configurations (direct and via SAP Cloud Connector), trigger test executions from ReleaseOwl, and view results, logs and reports inside ReleaseOwl.

### 1. Prerequisites

Before proceeding, ensure the following:

1. A **local Tosca server** is installed and running.
2. You have administrative access to both the **Tosca server** and **ReleaseOwl**.
3. You have access to the **network** where the Tosca server is hosted to ensure connectivity from ReleaseOwl.

### 2. Credential Manager Setup

The Credential Manager in ReleaseOwl allows you to securely register Tosca server credentials. Follow the steps below:

**Access Credential Manager**

1. Log in to **ReleaseOwl**.
2. Navigate to **Credential Manager**.
3. Click on **Register Credential** to create a new credential.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FSnzhBQ3CjNKS0bHk7AEB%2Fimage.png?alt=media&#x26;token=130a09b0-b93d-496c-9366-5c247c124ebc" alt=""><figcaption></figcaption></figure>

**2: Enter Credential Details**

Fill in the required fields:

* **Credential Name:** Enter a descriptive name for this credential (e.g., `Tosca_Local`).
* **Credential Type:** Select **Tosca Server**.
* **Scope:**
  * **Global:** Credential is accessible to all ReleaseOwl users.
  * **Private:** Credential is accessible only to the user who created it.
* **Token URL:** Enter the URL to your Tosca server token endpoint in the format: http(s)://\<Tosca\_Server\_IP\_or\_Hostname>:/tua/connect/token

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FAiTpaSj8Mpzbqpm5GPXz%2Fimage.png?alt=media&#x26;token=83bd1902-4df8-4f1b-8c30-b40ced8adaaa" alt=""><figcaption></figcaption></figure>

#### 3: Generate Client ID and Client Secret

1. Open your **local Tosca server** and go to **User Administration** → **My Account**.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FQxFhSLuuARrs02Rnwaia%2Fimage.png?alt=media&#x26;token=9294c66b-799d-4bd9-b0dd-7cfa6d72707e" alt=""><figcaption></figcaption></figure>

2. Click **Add New** to create a new user token.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FbKhwbfYqx70cM4KYuqGt%2Fimage.png?alt=media&#x26;token=55522639-414a-4294-a9a5-f1c9146b6d88" alt=""><figcaption></figcaption></figure>

3. Enter a name of your choice and click **Generate Token**.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FLmz48qgYXegSrbudOtzb%2Fimage.png?alt=media&#x26;token=c5c15a0d-855d-400d-9317-d9a3bbd03452" alt=""><figcaption></figcaption></figure>

4. Copy the generated **Client ID** and **Client Secret**.
5. Paste these values into the corresponding fields in ReleaseOwl’s Credential Manager.
6. Click **Save** to register the credential.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FRKBmXIH4jvgT5XfNhbJz%2Fimage.png?alt=media&#x26;token=afe2ed79-088b-4bfd-be06-1c35be84f1f3" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FtbnV0bpPyZvcNaaZqV3C%2Fimage.png?alt=media&#x26;token=22137740-3223-4ac4-baea-2f925141cb2c" alt=""><figcaption></figcaption></figure>

### 3. Test Configuration with Proxy Type: None

This option is used when ReleaseOwl connects directly to the Tosca server without using a cloud connector.

#### 1: Create Test Configuration

1. Navigate to **Project View** in ReleaseOwl.
2. Under **Test Automation**, click **Test Configuration**.
3. Click **Create Test Configuration** to start.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2Flk5I61zgWfKVnKUCqu23%2Fimage.png?alt=media&#x26;token=1cd18024-b05c-444f-b3c8-1cef888e73a8" alt=""><figcaption></figcaption></figure>

#### 2: Fill Test Configuration Details

* **Name:** Enter a name for this configuration (e.g., `Tosca_UAT_Integration`).
* **Test System:** Select the Tosca server.&#x20;
* **Proxy Type:** Select **None.**&#x20;
* **Credentials:** Select the credential you registered earlier.
* **Tosca Server URL:** Enter the URL of your Tosca server.
* **Project Name:** Enter the project name which is nothing but the workspace in the tosca commander.
* **Events:** Enter the Tosca test events name sets that need to be executed.&#x20;

#### 3: Save and Verify

1. Click **Submit** to store the Test Configuration.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FUWymFELHTrBo4GTwPYA0%2Fimage.png?alt=media&#x26;token=e172e976-15ff-41b0-a0a4-f0075ba6ec9a" alt=""><figcaption></figcaption></figure>

### 4. Test Configuration with SAP Cloud Connector

In addition to connecting directly, ReleaseOwl allows you to configure Tosca test execution via the **SAP Cloud Connector**. This enables secure connectivity between ReleaseOwl, Tosca Server, and your SAP BTP environment.

#### 1: Create Test Configuration with Cloud Connector

1. Navigate to **Project View** → **Test Configuration** under **Test Automation**.
2. Click **Create Test Configuration**.

#### 2: Fill Test Configuration Details

* **Name:** Enter a name for this configuration (e.g., `Tosca_UAT_Integration`).
* **Test System:** Select the Tosca server.
* **Proxy Type:** Select **SAP Cloud Connector**.
* **Proxy URL:** This will be automatically populated once the connector is selected.
* **SAP Cloud Credentials:** Select your **SAP BTP credentials** that you have already registered in the **Credential Manager**.
* **Destination:** Enter the destination that you have already created in your SAP BTP cockpit. This ensures ReleaseOwl routes requests securely through the connector.
* **Project Name:** Enter the Tosca workspace name (as created in Tosca Commander).
* **Events:** Enter the Tosca test event names that need to be executed during the pipeline run.

#### 3: Save and Verify

1. Click **Submit** to save the Test Configuration.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2F2F7oN9ETmmdM9cbpGP0h%2Fimage.png?alt=media&#x26;token=c4884331-94a3-4f18-a315-831629bf27cd" alt=""><figcaption></figcaption></figure>

### Executing Test Runs via Tosca Server

1. To start the execution, click the **Run** button in ReleaseOwl.
2. To view the test runs, click **View Test Runs** against the desired **Test Configuration**.
3. The executed test runs along with their results, logs, and reports will be displayed.

<figure><img src="https://1890383800-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FDWyxe6hm5vqosFaByVgs%2Fuploads%2FZP9bD4gxf2KUd30dKZam%2Fimage.png?alt=media&#x26;token=74d0ef32-3cb5-4662-a908-52cd2a9bba64" alt=""><figcaption></figcaption></figure>

4. **Reports and Logs**
   * When you click **Reports**, you will see details such as:
     * The executed test cases and their status.
   * When you click **Logs**, you will get the **SAP Test Logs**, which provide detailed execution information useful for troubleshooting and validation.
