getForkEvery

Returns the maximum number of test classes to execute in a forked test process. The forked test process will be restarted when this limit is reached.

By default, Gradle automatically uses a separate JVM when executing tests.

  • A value of 0 (no limit) means to reuse the test process for all test classes. This is the default.
  • A value of 1 means that a new test process is started for every test class. This is very expensive.
  • A value of N means that a new test process is started after N test classes.
This property can have a large impact on performance due to the cost of stopping and starting each test process. It is unusual for this property to be changed from the default.

Return

The maximum number of test classes to execute in a test process. Returns 0 when there is no maximum.