Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Percentage Reported By PHPUnit: What Does it Mean?

Tags:

phpunit

I'm working on my first project in which I'm utilizing PHPUnit for unit testing. Things have been moving along nicely; however, I've started getting the following output with recent tests:

................................................................. 65 / 76 ( 85%)
...........

Time: 1 second, Memory: 30.50Mb

OK (76 tests, 404 assertions)

I cannot find any information about what the "65 / 76 ( 85%)" means.

Does anyone know how to interpret this?

Thanks!

like image 823
tollmanz Avatar asked Jul 01 '12 21:07

tollmanz


People also ask

What is code coverage PHPUnit?

In computer science, code coverage is a measure used to describe the degree to which the source code of a program is tested by a particular test suite. A program with high code coverage has been more thoroughly tested and has a lower chance of containing software bugs than a program with low code coverage.

What is the purpose of PHPUnit?

PHPUnit is a framework independent library for unit testing PHP. Unit testing is a method by which small units of code are tested against expected results. Traditional testing tests an app as a whole meaning that individual components rarely get tested alone.

What is PHP testing?

In basic terms, unit testing means that you break your application down to its simplest pieces and test these small pieces to ensure that each part is error free (and secure). This testing is automated and written by software engineers as part of their development process.


1 Answers

It means the amount of tests that have been run so far (test methods actually, or to be even more precise: test method calls, because each test method can be called several times).

65 / 76 ( 85%)

65 tests of 76 have already run (which is 85% overall)

And as long as you see dots for each of them - all of them passed

like image 117
zerkms Avatar answered Sep 21 '22 15:09

zerkms