(Quick Reference)

2 Usage - Reference Documentation

Authors: Marcin Erdmann

Version: 0.1

2 Usage

2.1 Installation

To install the plugin use the install-plugin grails command:
grails install-plugin concurrent-test

You can also use the plugins block in BuildConfig.groovy:

plugins {
    build(':concurrent-test:0.1')
}

The :concurrent and :concurrent-explicit test types provided by the plugin pick up the same tests as the default :unit test type. Remember to always specify test type for the unit test phase after installing the plugin. Calling grails test-app or grails test-app unit: will cause your unit tests to be run three times: once for :concurrent, once for :concurrent-explicit and once for :unit test type - this is usually not what you want.

2.2 Running the tests

The plugin provides two new test types in unit test phase: concurrent and concurrent-explicit

2.2.1 :concurrent test type

Running

grails test-app unit:concurrent

Test execution process

All test classes are run concurrently apart from the ones marked with RunSequentially annotation which are run sequentially at the end of the test execution.

2.2.2 :concurrent-explicit test type

Running

grails test-app unit:concurrent-explicit

Test execution process

All the test classes that are marked with RunConcurrently annotation are run concurrently while all the other test classes are run sequentially at the end of the test execution.

2.3 Configuration

Currently there is only on configuration entry used by the plugin.

grails.plugin.concurrentTest.threadCount

Description

Allows to specify how many threads should be used for the concurrent test execution.

Default value

Runtime.runtime.availableProcessors() * 1.5