A target is QMTest's abstraction of a machine. By using multiple targets, you can run your tests on multiple machines at once. If you have many tests, and many machines, you can greatly reduce the amount of time it takes to run all of your tests by distributing the tests across multiple targets.
By default, QMTest uses only one target: the machine on which you are running QMTest. You may specify other targets by creating a target file, which lists the available targets and their attributes, and specifying the target file when you invoke qmtest.
Each target is a member of a single target group. All targets in the same
target group are considered equivalent. A target group is specified by a
string. If you are testing software on multiple platforms at once, the
target group might correspond to machines running the same operating
system. For example, all Intel 80386 compatible machines running GNU/Linux
might be in the “i386-pc-linux-gnu
” target
group.
QMTest by default executes all tests using a 'serial target', i.e. one after another. This behavior can be changed by specifying a different concurrency strategy, such as one that uses multiple threads, multiple processes, or even multiple physical machines.
>
qmtest create-target -a name=local -a group=local -a threads=2 a thread_target.ThreadTarget
This creates a 'thread target' where two threads are used to run the tests in parallel.