2 Usage - Reference Documentation
Authors: Marcin Erdmann
Version: 0.1
Table of Contents
2 Usage
2.1 Installation
To install the plugin use theinstall-plugin grails command:
grails install-plugin concurrent-test
BuildConfig.groovy:
plugins {
build(':concurrent-test:0.1')
}The:concurrentand:concurrent-explicittest types provided by the plugin pick up the same tests as the default:unittest type. Remember to always specify test type for the unit test phase after installing the plugin. Callinggrails test-apporgrails test-app unit:will cause your unit tests to be run three times: once for:concurrent, once for:concurrent-explicitand once for:unittest 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