在N个线程中并行运行相同的测试M次

问题描述 投票:0回答:1

我有一个带有单元测试的spring应用程序。我想检查我的代码在N个线程中运行时的工作方式。现在,我在测试中使用java.util.concurrent.ExecutorExecutableFuture,弹簧批处理功能等。

是否有简单的方法,类似于此注释:

@SuperPuperParallelTest(threadCount=5, timesToRun=100)
@Test
public void myTestMethod() { ... }

或其他(最好是注释驱动的)方法?

java spring junit5
1个回答
© www.soinside.com 2019 - 2024. All rights reserved.