phpunit-slow-test-detector icon indicating copy to clipboard operation
phpunit-slow-test-detector copied to clipboard

Measure duration of setup (before) & teardown (after) test class

Open mvorisek opened this issue 7 months ago • 2 comments

TestCase::setUpBeforeClass and TestCasetearDownAfterClass are not measured now and cannot be measured now, as currently the duration is measured per test.

What about measuring these too and reporting it as Cl::setUpBeforeClass/Cl::tearDownAfterClass items?

basic tests added in: #397

please note this must work with test process isolation correctly, where it might be counted into individual test duration

one example of (possibly) slow TestCase::setUpBeforeClass is https://github.com/atk4/ui/blob/5.0.0/tests/DemosHttpTest.php#L35, ie. things like starting (shared) webserver for a whole test class

related with #378, but not blocking

mvorisek avatar Dec 04 '23 10:12 mvorisek