Integrate CI/CD tools

To run tests automatically, you can integrate Tosca Cloud with a CI/CD pipeline, such as Jenkins. This integration allows you to skip repetitive tasks, such as logging into Tosca Cloud, manually running tests, watching test progress, or exporting results.

Your CI/CD tool connects to Tosca Cloud via API. This topic shows you how to get the following key authorization values from Swagger to set up your CI pipeline:

After you've copied all the values, you can start to authenticate your pipeline.

Before you start

Here's what you need to get started:

  • Administrator rights and a basic understanding of Swagger.

  • A CI/CD tool with a new pipeline script.

  • Checked which agents are available and ready to run your tests.

Get API authorization values

To integrate Tosca Cloud into your CI pipeline, you'll need to collect the key authorization values first. These include the client ID and secret, the token URL, the Tosca Cloud URL and the playlist ID. Follow the steps below, to retrieve each value: 

Request client ID and secret

The client ID identifies your application registered with Tosca Cloud. The client secret acts as a private key alongside the client ID to authenticate your pipeline.

Learn how to get the client ID and secret.

Get token URL

This URL is used by your CI pipeline to request access tokens for authenticating with Tosca Cloud APIs.

To get the E2G_AUTH_URL, follow these steps: 

  1. Open Swagger with the following link: https://<your Tosca Cloud URL>/_identity/apiDocs/swagger.

  2. Select Authorize.

  3. Copy the Token URL.

  4. Save the token URL somewhere safe, as you'll use it to authenticate your pipeline.

Get Tosca Cloud URL

This URL points to the workspace where your automated tests are stored.

To get the TOSCA_CLOUD_URL, follow these steps: 

  1. Open your Tosca Cloud workspace in a browser.

  2. Retrieve the workspace ID .

  3. Combine the workspace ID with your tenant URL in this format: https://<your tenant_url>/<workspace_id>.

    Example URL: https://vehicle_insurance_company/785fb70b-1621-4a71-a68f-05de9e1b40a3.

  4. Save the Tosca Cloud URL, as you'll use it to authenticate your pipeline.

Get playlist ID

This ID identifies the specific playlist your CI pipeline will run.

To get the PLAYLIST_ID, follow these steps:

  1. Open your Tosca Cloud playlist in a browser.

  2. Copy the playlist ID from the URL in this format: https://<your tenant>/portal/space/Default/playlists/edit/<playlist_id>.

    Example URL: https://vehicle_insurance_company/_portal/space/Default/playlists/edit/0aa88a1c-0bd1-4ee5-8ada-e89e7cecc2d2.

  1. Save the playlist ID, as you'll use it to authenticate your pipeline.

What's next

Connect your CI pipeline to Tosca Cloud and start running automated tests.