在没有 setUp 和 tearDown 方法的情况下计算 jmeter 中 junit 测试的执行时间?

Calculate time of execution of junit test in jmeter without setUp and tearDown methods?

在JMeter 中执行JUnit 方法时,侦听器中指定了时间。这个时间是包括调用TestCase的setUp和tearDown方法,还是只包括方法执行?如果包括 setUp 和 tearDown 方法执行的时间,是否有选项可以计算没有它们的测试方法的执行时间?

计时仅包括方法的执行,不包括 setup/teardown 次调用。

参见:

Note that JMeter currently runs the test methods directly, rather than leaving it to JUnit. This is to allow the setUp/tearDown methods to be excluded from the sample time.

并查看代码:

注意 sampleStart 开始时间在设置后被调用