Run Data Integrity tests in parallel

Tosca Commander can run TestCases in parallel, i.e. at the same time, provided you meet the following requirements:

  • You have valid DataIntegrityParallelExecution licenses. Please contact your respective Tricentis sales person for more information on Tricentis Data Integrity licensing for parallel execution.

  • The configuration parameter CanExecuteInParallel of the used Module(s) is set to True.

Set up parallel execution

To set up Data Integrity for parallel execution, follow these steps:

  1. Set the number of TestCases to be run in parallel in the Tosca Commander Options dialog under Tosca Data Integrity->Maximum number of tests run in parallel.

    The number must be higher than 1. For instance, if you want to run 4 tests in parallel, set the number to 4. The number of tests you can run in parallel depends on the machine and the number of DataIntegrityParallelExecution licenses you have purchased.

  2. Drag and drop your TestCases onto an ExecutionList. Data Integrity automatically creates a parallel block, i.e. a list of ExecutionEntries that Tosca will run at the same time.

    If you have selected your TestCase Templates and enabled the option Create ExecutionList in Step 4 of the Vital Checks: Database to Database Wizard, you do not have to do this. In this case, the Wizard automatically creates an ExecutionList with your TestCases in parallel blocks.

  3. If you execute your DI tests with Tosca Distributed Execution, you can run your TestCases in parallel on your Tosca Distribution Agents. We recommend that you choose this option if you're working with large test sets.

    To enable parallel execution, create a Windows environment variable with the name ENABLE_DEX_PARALLEL_EXECUTIONS and the value True on the Agent machine. You need to do this on all Agent machines that should be able to run tests in parallel. Note the following:

    • Agents can run a maximum of 8 TestCases in parallel.

    • The Agent variable overrides the number of TestCases you specified in the Options dialog. If you specified 5 TestCases in the Options dialog but are executing 12 TestCases, Tosca Distributed Execution runs 8 TestCases in parallel.

Buffers in parallel blocks

Since Tosca executes ExecutionEntries within the same parallel block at the same time, you can only define and use a buffer within the same TestCase. You cannot, for instance, set a buffer in one TestCase and read it in another.

Reorder blocks and ExecutionEntries

Tosca processes the ExecutionList in the following way:

  • It executes the ExecutionEntries within the parallel block at the same time.

  • It executes the parallel blocks themselves sequentially.

ExecutionList with parallel blocks

To do so, the system starts execution agents. The number of started execution agents depends on two things:

  • On the Maximum number of tests run in parallel that you have specified in the Tosca Commander Options dialog

  • On the number of ExecutionEntries within the parallel block

You have specified the option Maximum number of tests run in parallel as 3 and you have 4 ExecutionEntries.

At run-time, Tosca runs the first 3 ExecutionEntries in parallel. As soon as one of them is finished, Tosca starts ExecutionEntry number 4.

You have specified the option Maximum number of tests run in parallel as 3 and you have 2 ExecutionEntries.

At run-time, Tosca runs the two ExecutionEntries in parallel.

If you want to run a specific parallel block before or after another parallel block, change the order of the parallel blocks by using drag and drop.

Executing Completeness tests before Metadata tests

You can also move individual ExecutionEntries from one parallel block to another. In this case, the system runs this particular ExecutionEntry at the same time as the other ExecutionEntries in the parallel block you moved it to.