Distribution Modes

Incredibuild for Unit Tests can dramatically accelerate the unit test process by distributing the tests across any number of machines. But the question remains as to how these tests are broken up and distributed in order to maximize the parallelization effect, while maintaining their integrity. There are two distribution modes, as described below.

Assembly Level Distribution

An "Assembly" is the DLL that may include multiple tests and filters. A "Command" is the command line that orders the framework to run one or more assemblies.  In this mode, every Assembly is executed by a different command. Incredibuild can execute multiple commands across multiple cores. Essentially, each command, including all the tests within this command, will be executed in its entirety on a single local or remote core. However, different commands can be executed in parallel. So, if the Incredibuild Environment has 80 cores and there are 80 commands, all 80 commands will run in parallel. In this mode, the parallelization logic is pre-determined by the test design/architecture, which determines the content of each assembly. This "black-box" approach is especially useful when you have an elaborate or sensitive testing environment that you don't want to modify. All the filters and flags will remain in-tact and Incredibuild will not interfere with the internal logic of the assembly.

To implement Incredibuild for Unit Testing using the Assembly Level Distribution mode, see:

Supported Frameworks

The Assembly Level Distribution mode can be used by the following frameworks:

  • NUnit (uses IBTestConsole)

  • MSTest

  • VSTest

  • XUnit

  • Google Test (Gtest)

  • CppUTest

  • QTtest

Test Level Distribution

In this mode, Incredibuild splits each Assembly into different tasks (usually on a test level), and then distributes these tasks between the cores in Incredibuild Environment. For example, if an Assembly includes 100 tests, these tests can be executed on 100 cores at the same time. This mode offers better optimization due to the ability to achieve greater parallelization, and therefore improved performance. Within Incredibuild, the Test-Level Distribution process consists of the following stages during run-time (these stages are automatic and seamless for the user and do not require any intervention):

  • Pre-process analysis – the Initiator analyzes the Assemblies to create a list of tasks that will be distributed across the connected machines in Incredibuild Environment.

  • Distribution – the Initiator receives from the Coordinator a list of available cores on connected Helper machines, and then distributes the tasks. Nothing needs to be installed on the remote machines except for an Incredibuild Agent.

  • Post-process result aggregation – the results of all the tests are aggregated and provided to the framework as standard results per command. Due to the parallelization, the aggregated test results file will indicate the "unified" results of the actual "executions".

To implement Incredibuild for Unit Testing using the Test Level Distribution mode, see IBTestConsole Command Interface (for NUnit, GTest).