Execute Testim tests directly in Tosca

With the Testim Modules, you can seamlessly trigger and run Testim tests directly in your Tosca environment. This integration lets you manage and automate your Testim test executions without leaving Tosca. That means you get unified workflows and logs with insights into your test results all in one place.

To run your Testim tests in Tosca, follow these steps:

  1. Drag and drop the appropriate Testim Module into your TestCase, depending on whether you want to run an individual Testim test, a test suite, or a test plan.

  2. Set the ModuleAttributes to specify the Testim test, test suite, or test plan you want run.

  3. If you want to run your Testim test asynchronously:

    • In the Tosca Control Flow of the Module, set Wait for result to False.

    • Optionally, add the Wait for Testim Test Module if you want Tosca to wait for the Testim result after Tosca has completed its remaining TestSteps. Note that this step is not necessary if you prefer to trigger the Testim test and move on without waiting for the result.

  4. Run your ExecutionList.

In this example, you want to run a Testim test synchronously and make sure that it successfully finishes before you move on to the next TestSteps. To do this, you configure the Run Testim Test Module as follows:

  1. You specify the required details for your Testim test, including your Testim API Key, the Test ID, and the Grid the test should run on.

  2. You specify the Tosca Flow Control:

    • You set Wait for result to True, which makes Tosca wait for the Testim test to finish before it goes to the next TestStep.

    • You set Pass on test failures to False so that if the Testim test fails, the TestStep will fail as well.

Synchronous Testim test execution using Run Testim Test

In this example, you want to execute a specific Testim test asynchronously and wait for the Testim result after Tosca has completed its remaining TestSteps. To do this, you use the Run Testim Test and Wait for Testim Test Modules.

To run the Testim test asynchronously, you configure the Run Testim Test Module as follows:

  1. You specify the required details for your Testim test, including your Testim API Key, the Test ID, and the Grid the test should run on.

  2. You specify the Tosca Flow Control:

    • You use a buffer to store the Execution ID. This allows Tosca to automatically generate and track the Execution ID for the test.

    • You set Wait for result to False, which allows the execution to continue without waiting for the Testim test to finish.

    • You leave Pass on test failures empty. In the case of an asynchronous run, Tosca doesn't need to track the result of the Testim test within this TestStep. That means that the TestStep automatically passes if the test trigger works correctly.

To wait for the Testim test result, configure the Wait for Testim Test Module as follows:

  • Testim API Key: you reuse the same API key used in the Run Testim Test Module.

  • Execution ID: you reference the execution ID stored in the buffer to track the status of the Testim test.

  • Pass on test failures: you set this to False to make sure that the test execution fails if the test results failed.

Asynchronous Testim test execution using Run Testim Test and Wait for Testim Test