4

When writing PHPUnit tests, some of them turn out to take quite long to execute. To check certain functions, I need to check a lot of different combinations of variables, and this leads to a very long test.

Is is possible to tell PHPUnit how far the test has progressed so it can output the intermediate progress for the test to the command line? Now it is just waiting there for 2 minutes without any indication of progress.

I am just looking for an extra progress indicator that would be part of PHPUnit, and not just a custom echo, which I can write myself just fine.

Roel Vermeulen
  • 594
  • 7
  • 15
  • Possible duplicate of [PHPUnit: CLI output during test debugging possible?](http://stackoverflow.com/questions/7493102/phpunit-cli-output-during-test-debugging-possible) – Tschallacka Mar 06 '17 at 10:41
  • Just a sidenote: if you want to reduce the running time of your unit tests, you may be able to parallelize them. There are several tools for doing that with phpunit, I haven't tried any of them unfortunately. – chelmertz Mar 06 '17 at 10:42

1 Answers1

6

I am sorry, but this is not possible.

However, if you need to invoke the same piece of code with different data, for instance call the same method with different arguments, then you should have a look at data providers.

Sebastian Bergmann
  • 7,837
  • 1
  • 27
  • 35