Closed dxops closed 7 years ago
I'm not sure about this approach. Since Paraunit launches a lot of separated PHPUnit processes, this may impact time and memory usage: each process has to launch PHPUnit from scratch, so there is a definitive overhead there.
Also, IIRC, PHPUnit has a native option to make a test fail if it takes too long...
The single test execution time could also be inflated by the number of parallel processes, in truth i think the best way to know a single process resource consumption is still thru vanilla PHPunit.
@Jean85 That's right, PhpUnit supports test execution timeout as described in https://phpunit.de/manual/current/en/risky-tests.html#risky-tests.test-execution-timeout
Ok, so tracking time should may be unreliable and should be done on PHPUnit side. On the matter of memory consumption, I still believe it's unreliable; closing this until other suggestions.
Currently, we use PHPUnit plugins to track single test case duration. Plugins reporting to output will not work with JSON approach in Paraunit
Would be good to have an ability to track single test case memory and time consumption. Threshold option might filter results not to report all tests Another option might control test case failure in case test case is slow or a lot of memory used