Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PHPUnit progress dots are in new line and showing "wrong" percentage

I tested my toolkit and got this output

PHPUnit 3.7.21
Configuration read from php-application-toolkit/dev/Test/phpunit.xml
...............................................................  63 / 119 ( 52%)
........................................................           

At some point there is a new line and all other dots go there. The percentage is not 100% even if all tests are correct.

Whats wrong here? Does this have a meaning?

All related files are here: http://github.com/sourcerer-mike/php-application-toolkit/tree/release-0.2

like image 878
LeMike Avatar asked Jul 12 '13 08:07

LeMike


1 Answers

FLOOR(63/119*100) gives 52% ...

As PHPUnit executes a test, it displays a marker on your screen to indicate its progress.

It means that by the end of the first line of dots (one dot for each test), phpunit had completed 63 tests out of 119 total tests, which is 52% of the test run. There are 63 dots in that first line, showing that all 63 of those tests have been run and passed, without any fails, skips, ignores, etc. Correctness/failure of tests is shown by different colours/characters than ., such as a red F for a failed test

After each completed display line, PHPUnit shows the number of tests completed, total of all tests, and %complete.

The second line has 56 dots, showing the results for tests 64 through 119, at which point the run is 100% complete. Because it isn't a complete line of dots, but the run of all tests has actually completed, it doesn't show the numbers again; but will show detailed results for any errors or failures that occurred before returning to the command line prompt

like image 81
Mark Baker Avatar answered Sep 20 '22 23:09

Mark Baker