Prepare and trigger cloud test runs

We offer different integration options between Tosca on-premises and Tosca Cloud. If you chose test execution integration, you keep your tests on-premises but run them in Tosca Cloud. To run tests in the cloud, you use the cloud's test execution service, Elastic Execution Grid.

If you prepare and trigger cloud test runs in Tosca on-premises, Tosca displays results in both on-premises and cloud deployments.

This topic takes you through your test run workflow: how to create test events for Tosca Cloud, configure them, run them, and check their results.

Before you start

Before you can run tests in Tosca Cloud, make sure these things are in place:

Define your cloud tests

To define which on-premises tests you want to run in the cloud, follow these steps:

  1. In the Execution tab, right-click the ElasticExecutionGridEvents folder and select Create ElasticExecutionGridEvent from the mini toolbar.

  2. Drop one or more ExecutionLists onto the new ElasticExecutionGridEvent.

Alternatively, you can convert TestEvents that contain your ExecutionLists to ElasticExecutionGridEvents. To do so, right-click the TestEvents folder, or select one or more TestEvents within the folder and select Convert to ElasticExecutionGridEvent.

Use Characteristics to distribute tests

Characteristics (opens in new tab) define which Agents run which tests.

  • In Tosca Cloud, admins define Characteristics for Agents, typically for installed applications. Let's say only two out of five Agents have Safari installed. In this case, the admin gives these two Agents a "Safari" Characteristic.

  • In Tosca on-premises, you set the corresponding Characteristics on your tests. Let's say that ElasticExecutionGridEvent A should run on Safari. In this case, you set the corresponding "Safari" Characteristic for ElasticExecutionGridEvent A. This tells Elastic Execution Grid that it should send ElasticExecutionGridEvent A only to cloud Agents with the "Safari" Characteristic.

To set Characteristics on your tests in Tosca on-premises, follow these steps:

  1. Select an ElasticExecutionGridEvent and open the Properties pane.

  2. For the property AgentCharacteristics, enter the following information into the Value field: <Characteristic name>=<Characteristic value>.

    For example, Browser=Firefox.

    • You can also enter multiple values for the same Characteristic, separated by comma. For example, Browser=Firefox,Chrome.

    • You can also specify multiple Characteristics with different names, separated by semicolon. For example, Browser=Chrome,Explorer;InstalledApps=Salesforce.

    Keep in mind that an Agent must match all Characteristics you define. Make sure you choose a combination that actually exists.

Define how Tosca Cloud runs your tests

With Characteristics, you can define which Agents run your tests.

You can also use a test execution type to define how these Agents run your tests. Let's say you have two Agents that are a match for a particular ElasticExecutionGridEvent. Should only one Agent run all TestCases? Or can you split tests between Agents?

You can choose from the following test execution types:

  • SequentialSingleMachine: one Agent runs all TestCases in sequence. This is the default option.

  • SequentialMultipleMachines: multiple Agents run the TestCases in sequence.

  • Parallel: multiple Agents run the TestCases in parallel. This is the fastest way to run your tests, but only choose it if you don't have any dependencies between TestCases.

To change the test execution type, follow these steps:

  1. Select an ExecutionList. Make sure it's the original ExecutionList and not its representation in your ElasticExecutionGridEvent.

  2. In the Properties pane of the ExecutionList, select a different value for ExecutionFlow.

You can define custom Tosca Cloud workspaces for a particular ElasticExecutionGridEvent. This way, you can display an overview of team-relevant results. To define custom Tosca Cloud workspaces, follow these steps:

  1. Select an ElasticExecutionGridEvent and open the Properties pane.

  2. For the property CloudWorkspaceId, enter the unique ID of the Tosca Cloud workspace. For information on how to get the Workspace ID, check out the Tosca Cloud manual (opens in new tab).

Trigger test runs

You've created and configured your ElasticExecutionGridEvent. To run it in Tosca Cloud, follow these steps:

  1. Check in, if you have local changes.

  2. Right-click one or more ElasticExecutionGridEvents and select Execute in Tosca Cloud from the context menu.

  3. If you use Tosca Server with an HTTPS binding and this is not a Tosca Server Repository workspace, sign in with your Tricentis User Administration credentials.

Please note that Tosca only shows results in both deployments if you trigger test runs in Tosca on-premises. If you trigger a test run in Tosca Cloud, results are in Tosca Cloud only.

Check results

To see whether your application behaved as expected, check your results:

When triggering test runs and checking run results, keep the following limitations in mind:

  • If you cancel a test run in Tosca Cloud, no results are sent back to Tosca on-premises.

  • If the test run fails due to an agent disconnection in Tosca Cloud, no results are sent back to Tosca on-premises.

  • You can't trigger test runs for qTest TestEvents.