Class JunitCustomStrategy
-
- All Implemented Interfaces:
-
org.junit.platform.engine.support.hierarchical.ParallelExecutionConfiguration,org.junit.platform.engine.support.hierarchical.ParallelExecutionConfigurationStrategy
public final class JunitCustomStrategy implements ParallelExecutionConfiguration, ParallelExecutionConfigurationStrategyПользовательская стратегия (custom strategy) для реализации параллелизации запуска автотестов.
Количество автотестов, запускаемых одновременно, равно количеству логических ядер процессора.
В настройках проекта следует указать следующие свойства:
junit.jupiter.execution.parallel.enabled=true junit.jupiter.execution.parallel.config.strategy=custom junit.jupiter.execution.parallel.config.custom.class=io.bitbucket.dsmoons.framework.odk.JunitCustomStrategyУ тестового класса указать аннотацию
@Execution(ExecutionMode.CONCURRENT)
-
-
Constructor Summary
Constructors Constructor Description JunitCustomStrategy()Конструктор
-
Method Summary
Modifier and Type Method Description IntegergetParallelism()IntegergetMinimumRunnable()IntegergetMaxPoolSize()IntegergetCorePoolSize()IntegergetKeepAliveSeconds()ParallelExecutionConfigurationcreateConfiguration(ConfigurationParameters parameters)-
-
Method Detail
-
getParallelism
Integer getParallelism()
-
getMinimumRunnable
Integer getMinimumRunnable()
-
getMaxPoolSize
Integer getMaxPoolSize()
-
getCorePoolSize
Integer getCorePoolSize()
-
getKeepAliveSeconds
Integer getKeepAliveSeconds()
-
createConfiguration
ParallelExecutionConfiguration createConfiguration(ConfigurationParameters parameters)
-
-
-
-